/* =========================================================
   DOCTOR SALES CRM
   MAIN STYLE
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --background: #f5f7fb;
    --white: #ffffff;
    --text: #172033;
    --text-light: #64748b;
    --border: #e5e7eb;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 12px 30px rgba(15, 23, 42, 0.10);
    --radius: 14px;
}


/* =========================================================
   BODY
========================================================= */

body {
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}


/* =========================================================
   LOGIN
========================================================= */

#loginBox {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: radial-gradient( circle at top right, #dbeafe, transparent 35% ), radial-gradient( circle at bottom left, #e0e7ff, transparent 35% ), var(--background);
}


.login {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
    text-align: center;
}


.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}


.login-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--primary);
    color: white;
    font-size: 30px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
}


.login h3 {
    font-size: 26px;
    color: var(--text);
    margin-bottom: 6px;
}


.login-subtitle {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 28px;
}


.login-field {
    text-align: left;
    margin-bottom: 18px;
}


    .login-field label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 7px;
    }


.login-button {
    width: 100%;
    margin-top: 8px;
    padding: 13px 20px;
    font-size: 15px;
}


/* =========================================================
   MAIN PANEL
========================================================= */

#panel {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 25px;
}


/* =========================================================
   HEADER
========================================================= */

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}


.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}


.header-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 25px;
    font-weight: 700;
}


.header-left h1 {
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 3px;
}


.header-left p {
    color: var(--text-light);
    font-size: 13px;
}


.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}


.admin-status {
    padding: 7px 12px;
    border-radius: 20px;
    background: #f0fdf4;
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}


.logout-button {
    padding: 10px 17px;
    background: #f8fafc;
    color: var(--text);
    border: 1px solid var(--border);
}


    .logout-button:hover {
        background: #f1f5f9;
        color: var(--danger);
        border-color: #fecaca;
        box-shadow: none;
    }


/* =========================================================
   FILTER SECTION
========================================================= */

.filter-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}


.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}


    .section-heading h3 {
        font-size: 18px;
        color: var(--text);
        margin-bottom: 3px;
    }


    .section-heading p {
        color: var(--text-light);
        font-size: 13px;
    }


.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}


.filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


    .filter-field label {
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
    }


/* =========================================================
   INPUTS / SELECTS
========================================================= */

input,
select {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--white);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}


    input:hover,
    select:hover {
        border-color: #cbd5e1;
    }


    input:focus,
    select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
    }


select {
    cursor: pointer;
}


/* =========================================================
   BUTTON
========================================================= */

button {
    border: none;
    border-radius: 9px;
    padding: 11px 18px;
    background: var(--primary);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
}


    button:hover {
        background: var(--primary-dark);
        box-shadow: 0 6px 16px rgba(37, 99, 235, .20);
    }


    button:active {
        transform: scale(.98);
    }


/* =========================================================
   DASHBOARD
========================================================= */

.dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}


.dashboard-card {
    position: relative;
    overflow: hidden;
    min-height: 135px;
    padding: 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}


    .dashboard-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-hover);
    }


    .dashboard-card::after {
        content: "";
        position: absolute;
        right: -30px;
        bottom: -30px;
        width: 110px;
        height: 110px;
        border-radius: 50%;
        background: var(--primary-light);
    }


.dashboard-card-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}


.dashboard-card h4 {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 9px;
}


.dashboard-card span {
    display: block;
    color: var(--text);
    font-size: 26px;
    font-weight: 700;
}


.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
}


.debt-icon {
    background: #fff7ed;
    color: var(--warning);
}


/* =========================================================
   CONTENT SECTION
========================================================= */

.content-section {
    margin-bottom: 25px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}


    .content-section .section-heading {
        margin-bottom: 20px;
    }


/* =========================================================
   REPRESENTATIVE GRID
========================================================= */

.rep-grid,
#representativeCards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}


/* =========================================================
   REPRESENTATIVE CARD
========================================================= */

.representative-card {
    position: relative;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 13px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .04);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}


    .representative-card:hover {
        transform: translateY(-4px);
        border-color: rgba(37, 99, 235, .35);
        box-shadow: 0 12px 25px rgba(15, 23, 42, .09);
    }


    .representative-card h4 {
        color: var(--text);
        font-size: 17px;
        margin-bottom: 15px;
    }


    .representative-card p {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 9px 0;
        border-bottom: 1px solid #f1f5f9;
        color: var(--text-light);
        font-size: 13px;
    }


        .representative-card p:last-of-type {
            border-bottom: none;
        }


    .representative-card strong {
        color: var(--text);
        font-size: 14px;
    }


    .representative-card div {
        color: var(--primary) !important;
        font-weight: 600;
    }


/* =========================================================
   TABLE
========================================================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 11px;
}


.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}


    .admin-table th {
        padding: 14px 15px;
        background: #f8fafc;
        color: var(--text-light);
        border-bottom: 1px solid var(--border);
        text-align: left;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }


    .admin-table td {
        padding: 14px 15px;
        color: var(--text);
        border-bottom: 1px solid #f1f5f9;
        font-size: 13px;
    }


    .admin-table tbody tr {
        transition: background .15s;
    }


        .admin-table tbody tr:hover {
            background: #f8fbff;
        }


        .admin-table tbody tr:last-child td {
            border-bottom: none;
        }


/* =========================================================
   PAGE HEADER
   representative.html / doctor.html
========================================================= */

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px;
}


.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 25px;
    margin-bottom: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


    .page-header h2 {
        color: var(--text);
        font-size: 25px;
        margin-bottom: 4px;
    }


    .page-header p {
        color: var(--text-light);
        font-size: 14px;
    }


/* =========================================================
   OLD TOP BAR SUPPORT
========================================================= */

.top-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px;
    margin-bottom: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


    .top-bar select {
        width: 250px;
    }


    .top-bar input {
        width: 190px;
    }


.soz {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   TABLE TITLE
========================================================= */

.table-title {
    margin: 25px 0 15px;
    color: var(--text);
    font-size: 19px;
}


/* =========================================================
   SUMMARY
========================================================= */

.summary {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}


.summary-box {
    padding: 11px 17px;
    border-radius: 9px;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   MODAL
========================================================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .55);
}


.box {
    width: 100%;
    max-width: 500px;
    padding: 28px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0,0,0,.20);
}


    .box h3 {
        margin-bottom: 20px;
    }


    .box input,
    .box select {
        margin-bottom: 10px;
    }


/* =========================================================
   SEARCH / TOOLBAR
========================================================= */

#search {
    flex: 1;
    min-width: 220px;
}


.doctor-toolbar,
.medicine-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}


    .doctor-toolbar input,
    .medicine-toolbar input {
        flex: 2;
        min-width: 250px;
    }


    .doctor-toolbar select,
    .medicine-toolbar select {
        flex: 1;
        min-width: 220px;
    }


/* =========================================================
   STATUS
========================================================= */

.success {
    color: var(--success);
}


.danger {
    color: var(--danger);
}


/* =========================================================
   MOBILE — TABLET
========================================================= */

@media (max-width: 1100px) {

    #panel {
        padding: 18px;
    }


    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }


    .rep-grid,
    #representativeCards {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    #panel,
    .container {
        padding: 12px;
    }


    .main-header {
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
    }


    .header-right {
        justify-content: space-between;
    }


    .header-left h1 {
        font-size: 19px;
    }


    .filter-section,
    .content-section {
        padding: 16px;
    }


    .filter-grid {
        grid-template-columns: 1fr;
    }


    .dashboard {
        grid-template-columns: 1fr;
    }


    .dashboard-card {
        min-height: 120px;
    }


    .rep-grid,
    #representativeCards {
        grid-template-columns: 1fr;
    }


    .page-header {
        flex-direction: column;
        align-items: stretch;
    }


        .page-header button {
            width: 100%;
        }


    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }


        .top-bar select,
        .top-bar input,
        .top-bar button {
            width: 100%;
        }


    /* TABLE → MOBILE CARDS */

    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }


        .admin-table thead {
            display: none;
        }


        .admin-table tr {
            margin-bottom: 12px;
            padding: 8px;
            background: var(--white);
            border: 1px solid var(--border);
            border-radius: 11px;
        }


        .admin-table td {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
            padding: 10px;
            border-bottom: 1px solid #f1f5f9;
        }


            .admin-table td:last-child {
                border-bottom: none;
            }


    .login {
        padding: 30px 22px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .header-left {
        align-items: flex-start;
    }


    .header-icon {
        width: 42px;
        height: 42px;
        font-size: 21px;
    }


    .header-left h1 {
        font-size: 17px;
    }


    .header-left p {
        font-size: 12px;
    }


    .admin-status {
        font-size: 12px;
    }


    .logout-button {
        padding: 9px 12px;
    }


    .dashboard-card {
        padding: 18px;
    }


        .dashboard-card span {
            font-size: 23px;
        }


    .section-heading h3 {
        font-size: 17px;
    }


    .login {
        padding: 26px 18px;
    }
}

.filter-action button {
    width: 100%;
    height: 44px;
}

.filter-action button {
    width: 100%;
    height: 44px;
}

@media (min-width: 1101px) {

    #panel .filter-grid {
        grid-template-columns: repeat(6, minmax(130px, 1fr));
    }

        #panel .filter-grid .filter-field button {
            width: 100%;
            height: 44px;
        }
}

/* =========================================================
   ADMIN PANEL SPECIAL DESIGN
========================================================= */

.admin-filter-section {
    margin-bottom: 20px;
}


.admin-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}


.admin-filter-actions {
    display: flex;
    gap: 8px;
    height: 44px;
}


    .admin-filter-actions button {
        height: 44px;
        white-space: nowrap;
    }


.filter-main-button {
    background: #2563eb;
}


.add-main-button {
    background: #0f172a;
}


    .add-main-button:hover {
        background: #1e293b;
    }


.admin-dashboard {
    grid-template-columns: repeat(2, 1fr);
    max-width: 850px;
    margin-bottom: 22px;
}


    .admin-dashboard .dashboard-card {
        min-height: 125px;
    }


.admin-modal {
    max-width: 520px;
}


    .admin-modal .filter-field {
        margin-bottom: 15px;
    }


    .admin-modal .section-heading {
        margin-bottom: 22px;
    }


.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}


    .modal-buttons button {
        min-width: 110px;
    }


/* =========================================================
   ADMIN TABLE
========================================================= */

#panel .table-wrapper {
    box-shadow: 0 2px 10px rgba(15, 23, 42, .03);
}


#panel .admin-table th {
    height: 48px;
}


#panel .admin-table td {
    height: 52px;
}


/* =========================================================
   ADMIN RESPONSIVE
========================================================= */

@media (max-width: 1200px) {

    .admin-filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }


    .admin-filter-actions {
        grid-column: span 3;
        justify-content: flex-end;
    }
}


@media (max-width: 700px) {

    .admin-filter-grid {
        grid-template-columns: 1fr;
    }


    .admin-filter-actions {
        grid-column: auto;
        width: 100%;
        height: auto;
        flex-direction: column;
    }


        .admin-filter-actions button {
            width: 100%;
        }


    .admin-dashboard {
        grid-template-columns: 1fr;
        max-width: none;
    }
}

/* Admin satış cədvəlində artıq sütunları gizlət */

#panel .admin-table th:nth-child(6),
#panel .admin-table th:nth-child(7),
#panel .admin-table td:nth-child(7),
#panel .admin-table th:nth-child(8),
#panel .admin-table td:nth-child(8),
#panel .admin-table td:nth-child(9) {
    display: none;
}

/* =========================================================
   MANAGEMENT CARDS
========================================================= */

.management-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}


.management-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    transition: transform .2s ease, box-shadow .2s ease;
}


    .management-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    }


.management-card-info h4 {
    margin: 0 0 7px;
    font-size: 18px;
    color: #0f172a;
}


.management-card-info span {
    font-size: 13px;
    color: #64748b;
}


.management-card-actions {
    display: flex;
    gap: 7px;
}


    .management-card-actions button {
        border: none;
        border-radius: 8px;
        padding: 8px 11px;
        cursor: pointer;
        font-size: 13px;
    }


.edit-button {
    background: #e0ecff;
    color: #2563eb;
}


    .edit-button:hover {
        background: #2563eb;
        color: #ffffff;
    }


.delete-button {
    background: #fee2e2;
    color: #dc2626;
}


    .delete-button:hover {
        background: #dc2626;
        color: #ffffff;
    }


.empty-state {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 35px;
    text-align: center;
    color: #64748b;
}


@media (max-width: 1100px) {

    .management-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 650px) {

    .management-grid {
        grid-template-columns: 1fr;
    }


    .management-card {
        flex-direction: column;
        align-items: flex-start;
    }


    .management-card-actions {
        width: 100%;
    }


        .management-card-actions button {
            flex: 1;
        }
}
#representativeModal {
    display: none;
}

#representativeModal .box {
    position: relative;
    z-index: 1001;
}

/* =====================================================
   MEDICINE MANAGEMENT
===================================================== */

#medicineList {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 25px;
}


/* =====================================================
   MEDICINE CARD
===================================================== */

.medicine-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}


    .medicine-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
        border-color: #d5dbea;
    }


/* =====================================================
   HEADER
===================================================== */

.medicine-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}


.medicine-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 13px;
    font-size: 22px;
}


.medicine-title {
    min-width: 0;
}


    .medicine-title h4 {
        margin: 0 0 6px;
        font-size: 17px;
        font-weight: 700;
        color: #0f172a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


/* =====================================================
   STATUS
===================================================== */

.medicine-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}


    .medicine-status.active {
        background: #ecfdf3;
        color: #15803d;
    }


    .medicine-status.passive {
        background: #fef2f2;
        color: #dc2626;
    }


/* =====================================================
   PRICE
===================================================== */

.medicine-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 12px;
    padding: 13px 14px;
    margin-bottom: 15px;
}


    .medicine-price span {
        font-size: 12px;
        color: #64748b;
    }


    .medicine-price strong {
        font-size: 18px;
        font-weight: 800;
        color: #2563eb;
    }


/* =====================================================
   INFO
===================================================== */

.medicine-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}


.medicine-info-item {
    border: 1px solid #eef0f4;
    border-radius: 12px;
    padding: 11px 12px;
    background: #ffffff;
}


    .medicine-info-item span {
        display: block;
        font-size: 11px;
        color: #64748b;
        margin-bottom: 5px;
    }


    .medicine-info-item strong {
        font-size: 14px;
        color: #0f172a;
    }


    .medicine-info-item small {
        margin-left: 3px;
        color: #64748b;
        font-size: 11px;
    }


/* =====================================================
   ACTIONS
===================================================== */

.medicine-actions {
    display: flex;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid #eef0f4;
}


.medicine-edit-button,
.medicine-delete-button {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}


.medicine-edit-button {
    background: #eff6ff;
    color: #2563eb;
}


.medicine-delete-button {
    background: #fef2f2;
    color: #dc2626;
}


    .medicine-edit-button:hover,
    .medicine-delete-button:hover {
        transform: translateY(-1px);
        opacity: 0.85;
    }


.medicine-passive-label {
    width: 100%;
    text-align: center;
    padding: 10px;
    background: #f8fafc;
    color: #64748b;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1200px) {

    #medicineList {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 900px) {

    #medicineList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 600px) {

    #medicineList {
        grid-template-columns: 1fr;
        gap: 14px;
    }


    .medicine-card {
        padding: 16px;
    }
}


/* =====================================================
   DOCTOR MANAGEMENT
===================================================== */

#doctorList {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 25px;
}


/* =====================================================
   DOCTOR CARD
===================================================== */

.doctor-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}


    .doctor-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
        border-color: #d5dbea;
    }


/* =====================================================
   HEADER
===================================================== */

.doctor-card-header {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}


.doctor-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 14px;
    font-size: 23px;
    flex-shrink: 0;
}


.doctor-card-header h4 {
    margin: 0 0 5px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.doctor-card-header span {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}


/* =====================================================
   INFO
===================================================== */

.doctor-card-info {
    margin-bottom: 18px;
}


    .doctor-card-info > div {
        background: #f8fafc;
        border: 1px solid #eef0f4;
        border-radius: 12px;
        padding: 13px 14px;
    }


    .doctor-card-info span {
        display: block;
        margin-bottom: 6px;
        color: #64748b;
        font-size: 11px;
    }


    .doctor-card-info strong {
        display: block;
        color: #0f172a;
        font-size: 14px;
        font-weight: 700;
    }


/* =====================================================
   ACTIONS
===================================================== */

.doctor-actions {
    display: flex;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid #eef0f4;
}


.doctor-edit-button,
.doctor-delete-button {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}


.doctor-edit-button {
    background: #eff6ff;
    color: #2563eb;
}


.doctor-delete-button {
    background: #fef2f2;
    color: #dc2626;
}


    .doctor-edit-button:hover,
    .doctor-delete-button:hover {
        transform: translateY(-1px);
        opacity: 0.85;
    }


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1200px) {

    #doctorList {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 900px) {

    #doctorList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 600px) {

    #doctorList {
        grid-template-columns: 1fr;
        gap: 14px;
    }


    .doctor-card {
        padding: 16px;
    }


    .doctor-card-header h4 {
        font-size: 16px;
    }
}