/*==================================================
  PHARMACY MANAGEMENT SYSTEM
  PROFESSIONAL UI CSS
==================================================*/

/*=========================
        GENERAL
==========================*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f4f7fc;
    font-family: "Segoe UI",Tahoma,Geneva,Verdana,sans-serif;
    color: #1e293b;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: .3s;
}

h1, h2, h3, h4, h5, h6 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 10px;
}

p {
    color: #64748b;
}

/*=========================
      SIDEBAR
==========================*/

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg,#0f172a,#1e3a8a,#2563eb);
    color: #fff;
    overflow-y: auto;
    box-shadow: 6px 0 20px rgba(0,0,0,.18);
    z-index: 1000;
}

.logo {
    text-align: center;
    padding: 28px;
    font-size: 24px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

    .logo i {
        color: #22c55e;
        font-size: 30px;
        margin-right: 10px;
    }
/*=====================================
        SIDEBAR LOGO
=====================================*/

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    padding: 3px;
}

.logo-text {
    color: white;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.sidebar a,
.sidebar .sidebar-link {
    display: block;
    color: white;
    padding: 16px 25px;
    font-size: 15px;
    border-left: 4px solid transparent;
    transition: .3s;
}

    .sidebar a i,
    .sidebar .sidebar-link i {
        width: 25px;
    }

    .sidebar a:hover,
    .sidebar .sidebar-link:hover {
        background: rgba(255,255,255,.12);
        border-left: 4px solid #22c55e;
        color: white;
    }


.login-image {
    width: 85px;
    height: 85px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
}

    .login-image:hover {
        transform: scale(1.08);
    }

.password-box {
    position: relative;
}

    .password-box i {
        position: absolute;
        right: 15px;
        top: 15px;
        cursor: pointer;
        color: #64748b;
    }

.remember {
    margin-top: 8px;
    margin-bottom: 12px;
}

.login-footer {
    margin-top: 15px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
/*=========================
        MAIN
==========================*/

.main {
    margin-left: 260px;
    min-height: 100vh;
}

/*=========================
        TOPBAR
==========================*/

.topbar {
    height: 75px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 35px;
    box-shadow: 0 2px 15px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 999;
}

    .topbar h4 {
        margin: 0;
    }

.username {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

/*=========================
      PAGE CONTENT
==========================*/

.page {
    padding: 30px;
}

/*=========================
      PAGE HEADER
==========================*/

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 30px;
    font-weight: 700;
    color: #1e293b;
}

.page-subtitle {
    color: #64748b;
    font-size: 15px;
    margin-top: 4px;
}

/*=========================
      SECTION CARD
==========================*/

.section-card {
    background: white;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/*=========================
      CONTENT CARD
==========================*/

.card-box {
    background: white;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/*==================================================
                DASHBOARD
==================================================*/

.dashboard-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-bottom: 30px;
}

/*==================================================
                STAT CARDS
==================================================*/

.stat-card {
    flex: 1;
    min-width: 240px;
    border-radius: 20px;
    color: #fff;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: .35s;
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
    overflow: hidden;
    position: relative;
}

    .stat-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 18px 35px rgba(0,0,0,.25);
    }

    .stat-card::before {
        content: "";
        position: absolute;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        background: rgba(255,255,255,.08);
        right: -70px;
        top: -70px;
    }

    .stat-card i {
        font-size: 58px;
        opacity: .85;
    }

.stat-number {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 6px;
}

.stat-title {
    font-size: 17px;
    font-weight: 500;
    opacity: .95;
}

/*==================================================
                CARD COLORS
==================================================*/

.blue {
    background: linear-gradient(135deg,#2563eb,#1e40af);
}

.green {
    background: linear-gradient(135deg,#16a34a,#15803d);
}

.orange {
    background: linear-gradient(135deg,#ea580c,#c2410c);
}

.purple {
    background: linear-gradient(135deg,#9333ea,#7e22ce);
}

.teal {
    background: linear-gradient(135deg,#0f766e,#14b8a6);
}

.red {
    background: linear-gradient(135deg,#dc2626,#b91c1c);
}

.dark {
    background: linear-gradient(135deg,#1e293b,#0f172a);
}

/*==================================================
                DASHBOARD PANELS
==================================================*/

.dashboard-panel {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

    .dashboard-panel h3 {
        font-size: 22px;
        margin-bottom: 20px;
        color: #1e293b;
    }

/*==================================================
                CHART
==================================================*/

.chart-container {
    width: 100%;
    min-height: 350px;
    position: relative;
}

/*==================================================
            NOTIFICATION PANEL
==================================================*/

.notification-box {
    border-left: 5px solid #2563eb;
    background: #f8fbff;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 15px;
}

    .notification-box i {
        margin-right: 10px;
    }

.notification-success {
    border-left-color: #16a34a;
}

.notification-warning {
    border-left-color: #f59e0b;
}

.notification-danger {
    border-left-color: #dc2626;
}

/*==================================================
            QUICK INFO BOX
==================================================*/

.quick-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    background: #eef4ff;
    margin-bottom: 15px;
}

    .quick-info h4 {
        margin: 0;
    }

    .quick-info span {
        font-size: 20px;
        font-weight: 700;
        color: #2563eb;
    }

/*==================================================
                FORM CONTROLS
==================================================*/

.form-control {
    width: 100%;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 12px !important;
    padding: 10px 15px;
    background: #fff;
    font-size: 15px;
    transition: .3s;
    box-shadow: none;
}

    .form-control:focus {
        border-color: #2563eb;
        box-shadow: 0 0 12px rgba(37,99,235,.18);
        outline: none;
    }

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

/*==================================================
                SEARCH BOX
==================================================*/

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

    .search-box .form-control {
        flex: 1;
    }

/*==================================================
                BUTTONS
==================================================*/

.btn {
    border: none;
    border-radius: 12px !important;
    padding: 9px 18px;
    font-size: 15px;
    font-weight: 600;
    transition: .3s;
    cursor: pointer;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0,0,0,.12);
    }

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-success {
    background: #16a34a;
    color: #fff;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-secondary {
    background: #64748b;
    color: #fff;
}

.btn-info {
    background: #0ea5e9;
    color: #fff;
}

/*==================================================
                BUTTON GROUP
==================================================*/

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/*==================================================
                TABLES
==================================================*/

.table {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    border-collapse: collapse;
}

    .table th {
        background: #2563eb;
        color: #fff;
        padding: 14px;
        text-align: center;
        font-size: 15px;
    }

    .table td {
        padding: 13px;
        border-bottom: 1px solid #e5e7eb;
        vertical-align: middle;
    }

    .table tbody tr {
        transition: .3s;
    }

        .table tbody tr:hover {
            background: #eef4ff;
        }

/*==================================================
                GRIDVIEW
==================================================*/

table.table {
    margin-top: 15px;
}

    table.table a {
        text-decoration: none;
    }

    table.table .btn {
        padding: 6px 12px;
        font-size: 13px;
    }

/*==================================================
                BADGES
==================================================*/

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/*==================================================
                HORIZONTAL RULE
==================================================*/

hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 25px 0;
}

/*==================================================
                    LOGIN PAGE
==================================================*/

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg,#2563eb,#1e3a8a);
}

.login-card {
    width: 420px;
    max-height: 650px;
    overflow: auto;
    background: white;
    border-radius: 20px;
    padding: 28px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

    .login-logo i {
        font-size: 70px;
        color: #2563eb;
    }

.login-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 18px;
    font-size: 15px;
}

/*==================================================
                    REPORT CARDS
==================================================*/

.report-card {
    background: white;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

    .report-card h3 {
        margin-bottom: 20px;
    }

/*==================================================
                REPORT FILTER
==================================================*/

.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 20px;
}

/*==================================================
                    INVOICE
==================================================*/

.invoice {
    background: white;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 20px;
}

.invoice-company {
    font-size: 30px;
    font-weight: bold;
    color: #2563eb;
}

.invoice-address {
    color: #64748b;
}

.invoice-total {
    font-size: 28px;
    color: #16a34a;
    font-weight: bold;
    text-align: right;
    margin-top: 20px;
}

/*==================================================
                    ALERTS
==================================================*/

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left: 5px solid #16a34a;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 5px solid #dc2626;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 5px solid #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 5px solid #2563eb;
}

/*==================================================
                PRINT
==================================================*/

@media print {

    .sidebar,
    .topbar,
    .btn,
    .button-group {
        display: none !important;
    }

    .main {
        margin-left: 0;
    }

    .page {
        padding: 0;
    }

    body {
        background: white;
    }

    .card-box,
    .section-card {
        box-shadow: none;
    }
}

.chart-container {
    width: 350px;
    height: 350px;
    margin: 0 auto;
}

/*==================================================
                LOADING ANIMATION
==================================================*/

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 5px solid #e5e7eb;
    border-top: 5px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {

    100% {
        transform: rotate(360deg);
    }
}

/*==================================================
                FADE ANIMATION
==================================================*/

.fade-in {
    animation: fadeIn .6s ease-in-out;
}

@keyframes fadeIn {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*==================================================
                CARD HOVER
==================================================*/

.card-box,
.section-card,
.report-card {
    transition: .35s;
}

    .card-box:hover,
    .section-card:hover,
    .report-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 18px 35px rgba(0,0,0,.15);
    }

/*==================================================
                SCROLLBAR
==================================================*/

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #e5e7eb;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #1d4ed8;
    }

/*==================================================
                TABLE RESPONSIVE
==================================================*/

.table-responsive {
    overflow-x: auto;
}

/*==================================================
                IMAGE
==================================================*/

img {
    max-width: 100%;
    height: auto;
}

/*==================================================
                TEXT UTILITIES
==================================================*/

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-primary {
    color: #2563eb;
}

.text-success {
    color: #16a34a;
}

.text-danger {
    color: #dc2626;
    display: block;
    min-height: 22px;
    text-align: center;
    margin-top: 10px;
}

.text-warning {
    color: #f59e0b;
}

.text-muted {
    color: #64748b;
}

/*==================================================
                SPACING
==================================================*/

.mt-1 {
    margin-top: 10px;
}

.mt-2 {
    margin-top: 20px;
}

.mt-3 {
    margin-top: 30px;
}

.mb-1 {
    margin-bottom: 10px;
}

.mb-2 {
    margin-bottom: 20px;
}

.mb-3 {
    margin-bottom: 30px;
}

.p-1 {
    padding: 10px;
}

.p-2 {
    padding: 20px;
}

.p-3 {
    padding: 30px;
}

/*==================================================
                RESPONSIVE
==================================================*/

@media(max-width:992px) {

    .sidebar {
        width: 220px;
    }

    .main {
        margin-left: 220px;
    }

    .dashboard-row {
        flex-direction: column;
    }

    .stat-card {
        width: 100%;
    }
}

@media(max-width:768px) {

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .main {
        margin-left: 0;
    }

    .topbar {
        flex-direction: column;
        height: auto;
        padding: 20px;
        text-align: center;
    }

    .page {
        padding: 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .table {
        display: block;
        overflow-x: auto;
    }

    .dashboard-row {
        flex-direction: column;
    }
}

@media(max-width:480px) {

    .logo {
        font-size: 20px;
    }

    .page-title {
        font-size: 24px;
    }

    .stat-number {
        font-size: 26px;
    }

    .stat-card i {
        font-size: 40px;
    }
}
