
/* ============================================= */
/* DASHBOARD STYLES */
/* ============================================= */

.search-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
    margin-bottom: 0;
}

.search-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-card h4 {
    color: #1a2332;
    font-weight: 700;
    margin: 0;
    font-size: 20px;
}

.dashboard-date {
    color: #495057;
    font-size: 13px;
    background: #f8f9fa;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
}

.dashboard-wrapper {
    padding: 0 0 60px;
    background: #f0f2f5;
    min-height: 100vh;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0px auto;
    padding: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: #0dcaf0;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 0;
}

.stat-icon i {
    font-size: 14px;
    color: #ffffff;
}

.stat-icon.bg-primary { background: linear-gradient(135deg, #0dcaf0, #0aadcc); }
.stat-icon.bg-info { background: linear-gradient(135deg, #0d6efd, #0a5cdb); }
.stat-icon.bg-warning { background: linear-gradient(135deg, #ffc107, #e0a800); }
.stat-icon.bg-success { background: linear-gradient(135deg, #198754, #157347); }
.stat-icon.bg-danger { background: linear-gradient(135deg, #dc3545, #c82333); }
.stat-icon.bg-secondary { background: linear-gradient(135deg, #6c757d, #5a6268); }

.stat-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-number {
    font-size: 22px;
    font-weight: 700;
    color: #1a2332;
    margin: 0;
    line-height: 1.2;
}

.stat-label {
    color: var(--gray-color);
    font-size: 13px;
    font-weight: 500;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-grid-appointments {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-grid-medicine {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Dashboard Cards */
.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.dashboard-card-header {
    padding: 18px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
    flex-wrap: wrap;
    gap: 8px;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.card-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.card-icon {
    color: #0dcaf0;
    font-size: 15px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a2332;
    margin: 0;
}

.badge {
    font-weight: 500;
    padding: 4px 10px;
    font-size: 10px;
    border-radius: 20px;
}

.badge.bg-primary { background: #0dcaf0 !important; color: #fff; }
.badge.bg-success { background: #198754 !important; color: #fff; }
.badge.bg-danger { background: #dc3545 !important; color: #fff; }
.badge.bg-warning { background: #ffc107 !important; color: #fff; }
.badge.bg-info { background: #0d6efd !important; color: #fff; }
.badge.bg-secondary { background: #6c757d !important; color: #fff; }

.btn-outline-primary {
    color: #0dcaf0;
    border-color: #0dcaf0;
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 6px;
}

.btn-outline-primary:hover {
    background: #0dcaf0;
    color: #fff;
}

.dashboard-card-body {
    padding: 14px 18px;
}

.dashboard-card-body.p-0 {
    padding: 0;
}

/* Table */
.table-appointments {
    margin: 0;
}

.table-appointments thead th {
    font-weight: 600;
    color: #6c757d;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    border-top: none;
    border-bottom: 1px solid #e9ecef;
    background: #fafbfc;
}

.table-appointments tbody td {
    font-size: 13px;
    color: #1a2332;
    padding: 10px 14px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
}

.table-appointments tbody tr:hover {
    background: #f8f9fa;
}

.table-appointments tbody tr:last-child td {
    border-bottom: none;
}

.appointment-time {
    font-weight: 600;
    color: #1a2332;
}

.patient-name, .doctor-name {
    font-weight: 500;
}

/* View Icon */
.view-icon {
    font-size: 20px;
    color: #0dcaf0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.view-icon:hover {
    color: #0aadcc;
    transform: scale(1.1);
}

.text-end {
    text-align: right !important;
}

.table-appointments thead th.text-end,
.table-appointments tbody td.text-end {
    text-align: right !important;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 8px;
    border: none;
    font-weight: 500;
}

.quick-action-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.quick-action-btn i {
    font-size: 18px;
}

.quick-action-btn span {
    font-size: 11px;
    font-weight: 500;
}

.quick-action-btn.bg-primary { background: linear-gradient(135deg, #0dcaf0, #0aadcc); }
.quick-action-btn.bg-success { background: linear-gradient(135deg, #198754, #157347); }
.quick-action-btn.bg-warning { background: linear-gradient(135deg, #ffc107, #e0a800); }
.quick-action-btn.bg-info { background: linear-gradient(135deg, #0d6efd, #0a5cdb); }
.quick-action-btn.bg-danger { background: linear-gradient(135deg, #dc3545, #c82333); }
.quick-action-btn.bg-secondary { background: linear-gradient(135deg, #6c757d, #5a6268); }

/* Status List */
.status-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 130px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-name {
    font-size: 13px;
    color: #1a2332;
    font-weight: 500;
}

.status-bar {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.status-percent {
    font-size: 13px;
    font-weight: 600;
    color: #1a2332;
    min-width: 35px;
    text-align: right;
}

/* Medicine List */
.medicine-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.medicine-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s;
}

.medicine-item:hover {
    background: #e9ecef;
}

.medicine-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.medicine-name {
    font-size: 13px;
    font-weight: 500;
    color: #1a2332;
}

.medicine-stock {
    font-size: 11px;
    color: #6c757d;
}

.medicine-stock i {
    margin-right: 3px;
}

.medicine-sold {
    display: flex;
    align-items: center;
    gap: 8px;
}

.medicine-count {
    font-size: 15px;
    font-weight: 700;
    color: #198754;
}

.medicine-label {
    font-size: 10px;
    color: #6c757d;
    text-transform: uppercase;
}

.medicine-revenue {
    font-size: 12px;
    font-weight: 600;
    color: #0dcaf0;
    background: #e3f9ff;
    padding: 3px 10px;
    border-radius: 4px;
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 180px;
}

/* ============================================= */
/* RESPONSIVE */
/* ============================================= */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid-appointments {
        grid-template-columns: 1fr;
    }

    .dashboard-grid-medicine {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 20px;
    }
    .stat-label {
        font-size: 11px;
    }
    .card-title {
        font-size: 14px;
    }
    .table-appointments tbody td {
        font-size: 13px;
    }
    .status-name {
        font-size: 13px;
    }
    .status-percent {
        font-size: 13px;
    }
    .medicine-name {
        font-size: 13px;
    }
    .medicine-count {
        font-size: 15px;
    }
    .quick-action-btn span {
        font-size: 11px;
    }
    .quick-action-btn i {
        font-size: 18px;
    }
    .badge {
        font-size: 10px;
    }
    .btn-outline-primary {
        font-size: 11px;
    }
    .dashboard-date {
        font-size: 13px;
    }
    .search-card h4 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .search-card {
        padding: 14px 18px;
    }

    .search-card-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .search-card h4 {
        font-size: 18px;
    }

    .dashboard-wrapper {
        padding: 0 0 30px;
    }

    .dashboard-container {
        padding: 5px;
        max-width: 100%;
        width: 96%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 12px 14px;
        gap: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-icon i {
        font-size: 17px;
    }

    .stat-number {
        font-size: 18px;
    }

    .stat-label {
        font-size: 10px;
    }

    .dashboard-date {
        font-size: 12px;
        padding: 5px 12px;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .quick-action-btn {
        padding: 10px 6px;
    }

    .quick-action-btn i {
        font-size: 16px;
    }

    .quick-action-btn span {
        font-size: 10px;
    }

    .dashboard-card-header {
        padding: 14px;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap;
        gap: 6px;
    }

    .card-header-left {
        flex-shrink: 0;
    }

    .card-header-right {
        flex-shrink: 0;
        width: auto !important;
        justify-content: flex-end !important;
    }

    .dashboard-card-body {
        padding: 10px 14px;
    }

    .card-title {
        font-size: 13px;
    }

    .table-appointments thead th {
        font-size: 9px;
        padding: 8px 10px;
    }

    .table-appointments tbody td {
        font-size: 12px;
        padding: 8px 10px;
    }

    .status-info {
        min-width: 100px;
    }

    .status-name {
        font-size: 12px;
    }

    .status-percent {
        font-size: 12px;
        min-width: 30px;
    }

    .medicine-name {
        font-size: 12px;
    }

    .medicine-count {
        font-size: 14px;
    }

    .medicine-revenue {
        font-size: 11px;
        padding: 2px 8px;
    }

    .chart-container {
        height: 140px;
    }

    .badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .btn-outline-primary {
        font-size: 10px;
        padding: 2px 10px;
    }

    .view-icon {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .search-card {
        padding: 10px 14px;
    }

    .search-card-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .search-card h4 {
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-icon i {
        font-size: 15px;
    }

    .stat-number {
        font-size: 16px;
    }

    .stat-label {
        font-size: 9px;
    }

    .dashboard-date {
        font-size: 9px;
        padding: 4px 10px;
        white-space: nowrap;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    .quick-action-btn {
        padding: 8px 4px;
    }

    .quick-action-btn i {
        font-size: 14px;
    }

    .quick-action-btn span {
        font-size: 9px;
    }

    .dashboard-card-header {
        padding: 12px;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap;
        gap: 4px;
    }

    .card-header-left {
        flex-shrink: 0;
    }

    .card-header-right {
        flex-shrink: 0;
        width: auto !important;
        justify-content: flex-end !important;
    }

    .badge {
        font-size: 9px;
        padding: 4px 6px;
    }

    .btn-outline-primary {
        font-size: 9px;
        padding: 2px 6px;
    }

    .chart-container {
        height: 120px;
    }

    .medicine-revenue {
        font-size: 10px;
        padding: 2px 6px;
    }

    .medicine-sold {
        gap: 5px;
    }

    .medicine-count {
        font-size: 13px;
    }

    .medicine-name {
        font-size: 11px;
    }

    .medicine-stock {
        font-size: 10px;
    }

    .status-name {
        font-size: 11px;
    }

    .status-percent {
        font-size: 11px;
        min-width: 25px;
    }

    .status-info {
        min-width: 80px;
    }

    .table-appointments tbody td {
        font-size: 11px;
        padding: 6px 8px;
    }

    .table-appointments thead th {
        font-size: 9px;
        padding: 6px 8px;
    }

    .card-title {
        font-size: 12px;
    }

    .card-icon {
        font-size: 14px;
    }

    .view-icon {
        font-size: 16px;
    }
}  