/* HopeVet — global stylesheet.
 * Ported from the Angular project's dashboard.scss / forms.scss / login.scss.
 * Original color palette and gradient preserved: linear-gradient(45deg,#328f8a,#08ac4b).
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime&display=swap');

* { margin: 0; padding: 0; border: none; outline: none; box-sizing: border-box;
    font-family: 'Poppins', sans-serif; }

html, body { background: #ebe9e9; color: #333; min-height: 100vh; }

a { color: inherit; text-decoration: none; }

/* ---------- Layout (sidebar + main) ---------- */
.dashboard-layout { display: flex; min-height: 100vh; }

.side-bar {
    position: sticky; top: 0; left: 0;
    width: 110px; height: 100vh;
    padding: 0 1.7rem;
    color: #fff;
    overflow: hidden;
    transition: all 0.5s linear;
    background: linear-gradient(45deg, #328f8a, #08ac4b);
}
.side-bar:hover { width: 240px; }

.logo {
    height: 80px; padding: 16px;
    display: flex; align-items: center;
    font-size: 1.4rem; font-weight: 700; color: #fff;
    white-space: nowrap;
}
.logo::before {
    content: "🐾"; font-size: 1.8rem; margin-right: 0.6rem;
}

.menu { list-style: none; padding: 0; position: relative; }
.menu li {
    padding: 1rem; margin: 8px 0; border-radius: 8px;
    transition: all 0.5s ease-in-out;
}
.menu li:hover, .menu li.active { background: #e0e0e058; }
.menu a {
    color: #fff; font-size: 14px;
    display: flex; align-items: center; gap: 1.5rem;
    white-space: nowrap;
}
.menu a span { overflow: hidden; }
.menu a i { font-size: 1.2rem; min-width: 20px; text-align: center; }

.menu .logout {
    position: fixed; bottom: 0; left: 0; right: 0;
    cursor: pointer;
}

.main-content {
    position: relative;
    background: #ebe9e9;
    flex: 1; padding: 1rem;
    min-width: 600px;
    overflow-x: auto;
}

/* ---------- Header ---------- */
.header-wrapper {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap;
    background: #fff; border-radius: 10px;
    padding: 10px 2rem; margin-bottom: 1rem;
}
.header-title { color: #4CAF50; }
.header-title span { font-size: 12px; color: #777; }
.header-title h3 { font-size: 1.4rem; }
.user-info { display: flex; align-items: center; gap: 1rem; }
.user-info img {
    width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
    object-fit: cover; background: #ddd;
}
.user-info .username { font-weight: 600; color: #333; }
.search-bar {
    background: rgb(237, 237, 237); border-radius: 15px;
    color: #4CAF50;
    display: flex; align-items: center; gap: 5px;
    padding: 4px 12px;
}
.search-bar marquee { width: 280px; }

/* ---------- Cards ---------- */
.card--container {
    background: #fff; padding: 2rem; border-radius: 10px;
    margin-bottom: 1rem;
}
.card--container .main--title {
    color: #4CAF50; padding-bottom: 10px; font-size: 25px;
}
.card--wrapper {
    display: flex; flex-wrap: wrap; gap: 1rem;
}
.payment--card {
    background: rgb(229, 223, 223); border-radius: 10px;
    padding: 1.2rem; width: 290px; height: 150px;
    display: flex; flex-direction: column; justify-content: space-between;
    transition: all 0.5s ease-in-out;
}
.payment--card:hover { transform: translateY(-5px); }
.payment--card .card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.payment--card .amount { display: flex; flex-direction: column; }
.payment--card .amount .title { font-size: 12px; font-weight: 300; }
.payment--card .amount .amount-value {
    font-size: 24px; font-family: 'Courier New', monospace; font-weight: 600;
}
.payment--card .icon {
    color: #fff; padding: 1rem;
    height: 60px; width: 60px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 1.5rem; background: red;
}
.payment--card .card-detail {
    font-size: 16px; color: #777; font-family: 'Courier New', monospace;
}

.light-red       { background: rgb(251, 233, 233) !important; }
.light-pink      { background: rgb(251, 233, 245) !important; }
.light-purple    { background: rgb(254, 226, 254) !important; }
.light-green     { background: rgb(235, 254, 235) !important; }
.light-blue      { background: rgb(236, 236, 254) !important; }
.light-sky-blue  { background: rgb(236, 253, 254) !important; }
.dark-red        { background: red !important; }
.dark-pink       { background: rgb(230, 0, 255) !important; }
.dark-purple     { background: purple !important; }
.dark-blue       { background: blue !important; }
.dark-sky-blue   { background: rgb(0, 200, 255) !important; }
.dark-green      { background: green !important; }

/* ---------- Tables ---------- */
.tabular-wrapper {
    background: #fff; margin-top: 1rem;
    padding: 2rem; border-radius: 10px;
}
.tabular-wrapper .main--title {
    color: #4CAF50; padding-bottom: 10px; font-size: 22px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
}
.table-container { width: 100%; overflow-x: auto; }
.table-container table { width: 100%; border-collapse: collapse; }
.table-container thead {
    background: linear-gradient(45deg, #328f8a, #08ac4b);
    color: #fff;
}
.table-container thead th { padding: 14px; text-align: left; font-weight: 500; }
.table-container tbody { background: #f2f2f2; }
.table-container tbody tr:nth-child(even) { background: #fff; }
.table-container td {
    padding: 12px 14px; font-size: 14px; color: #333; word-wrap: break-word;
}
.table-container tfoot {
    background: linear-gradient(45deg, #328f8a, #08ac4b);
    color: #fff; font-weight: 600;
}
.table-container tfoot td { padding: 12px 14px; }
.table-container .highlights { background: #fff5b1; color: #b06000; }

/* ---------- Forms ---------- */
.form-section {
    background: #fff; padding: 2rem; border-radius: 10px;
    margin-bottom: 1rem;
}
.form-section h3, .form-section .title {
    color: #4CAF50; padding-bottom: 10px; font-size: 20px;
    margin-bottom: 1rem;
}
.fields {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.input-fields { display: flex; flex-direction: column; gap: 4px; }
.input-fields label { font-size: 13px; color: #555; font-weight: 500; }
.input-fields input, .input-fields select, .input-fields textarea {
    background: #f6f6f6; padding: 10px 12px;
    border: 1px solid transparent; border-radius: 6px;
    font-size: 14px; color: #333;
}
.input-fields input:focus, .input-fields select:focus, .input-fields textarea:focus {
    border-color: #4CAF50; background: #fff;
}
.input-fields textarea { resize: vertical; min-height: 80px; }

.text-danger { color: rgb(214, 12, 12); font-size: 12px; }
.fs12 { font-size: 12px; }

.btn {
    display: inline-block; padding: 10px 18px; border-radius: 6px;
    cursor: pointer; font-size: 14px; font-weight: 500;
    transition: all 0.2s ease-in-out;
    background: #f1f1f1; color: #333;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    color: #fff;
    background: linear-gradient(45deg, #328f8a, #08ac4b);
}
.btn-danger   { background: #e74c3c; color: #fff; }
.btn-warning  { background: #f39c12; color: #fff; }
.btn-success  { background: #27ae60; color: #fff; }
.btn-secondary{ background: #95a5a6; color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 10px; font-size: 12px; }

.actions {
    display: flex; gap: 8px; margin-top: 1rem; flex-wrap: wrap;
}

/* ---------- Login page ---------- */
.login-layout {
    background: linear-gradient(45deg, #328f8a, #08ac4b);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.login-card {
    background: #fff; max-width: 420px; width: 100%;
    padding: 45px; border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.24);
    text-align: center;
}
.login-card .login-header h3 {
    color: #328f8a; margin-bottom: 4px; letter-spacing: 1px;
}
.login-card .login-header p {
    color: #888; font-size: 13px; margin-bottom: 20px;
}
.login-card form { display: flex; flex-direction: column; gap: 10px; }
.login-card input {
    background: #f2f2f2; padding: 14px; border-radius: 4px;
    font-size: 14px;
}
.login-card button {
    text-transform: uppercase; font-weight: 600;
    background: linear-gradient(45deg, #328f8a, #08ac4b);
    color: #fff; padding: 14px; cursor: pointer; border-radius: 4px;
    margin-top: 8px;
}
.login-card .footer-text { font-size: 13px; margin-top: 14px; color: #666; }
.login-card .footer-text a { color: #4CAF50; font-weight: 600; }

/* ---------- Flash messages ---------- */
.flash {
    padding: 10px 14px; border-radius: 6px; margin-bottom: 1rem;
    font-size: 14px;
}
.flash.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash.warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.flash.info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ---------- Toolbar above tables ---------- */
.toolbar {
    display: flex; gap: 0.6rem; flex-wrap: wrap;
    align-items: center; margin-bottom: 0.8rem;
}
.toolbar .spacer { flex: 1; }
.toolbar input[type="search"] {
    background: #f6f6f6; padding: 8px 12px; border-radius: 6px;
    font-size: 14px; min-width: 220px;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex; gap: 4px; margin-top: 1rem; flex-wrap: wrap;
    justify-content: center;
}
.pagination a, .pagination span {
    padding: 6px 10px; border-radius: 4px;
    background: #fff; color: #333; font-size: 13px;
    border: 1px solid #ddd;
}
.pagination .current {
    background: linear-gradient(45deg, #328f8a, #08ac4b);
    color: #fff; border-color: transparent;
}

/* ---------- Pet cards (patients) ---------- */
.pet-card {
    background: #f6f9f6; border: 1px solid #d6e6d6;
    border-radius: 8px; padding: 14px; margin: 8px 0;
}
.pet-name-card {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.pet-name-card label { font-weight: 600; min-width: 100px; }
.pet-name-card .category-age { color: #777; font-size: 13px; }

/* ---------- Scanner page ---------- */
.scanner-shell {
    background: #fff; padding: 2rem; border-radius: 10px;
}
.scanner-shell video {
    width: 100%; max-width: 560px; background: #000; border-radius: 8px;
}
.scanner-shell .results {
    margin-top: 1rem; padding: 12px;
    background: #f6f9f6; border-radius: 6px;
    border-left: 4px solid #4CAF50;
}
.scanner-shell .results small { color: #555; }
.scanner-shell .results strong { display: block; font-size: 18px; margin-top: 4px; }

/* ---------- Misc utilities ---------- */
.flex { display: flex; }
.gap-1 { gap: 1rem; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.muted { color: #888; font-size: 13px; }
.invoice-totals {
    margin-top: 1rem; display: flex; justify-content: flex-end;
}
.invoice-totals table { border-collapse: collapse; min-width: 320px; }
.invoice-totals td { padding: 8px 14px; }
.invoice-totals tr.grand td {
    font-size: 16px; font-weight: 700;
    background: linear-gradient(45deg, #328f8a, #08ac4b); color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .side-bar { width: 60px; padding: 0 0.4rem; }
    .side-bar:hover { width: 200px; }
    .menu a span { font-size: 13px; }
    .main-content { padding: 0.6rem; min-width: 0; }
    .payment--card { width: 100%; }
    .login-card { padding: 26px; }
}
