/* Persian Hospital Discharge Supervision System Custom Styling */
:root {
    --sidebar-bg: #0f3846;
    --sidebar-hover: #174b5c;
    --cyan-primary: #00b4d8;
    --cyan-dark: #0077b6;
    --bg-light: #f4f7f6;
    --text-dark: #2b2d42;
    --border-color: #e9ecef;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 20px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
    width: 45px;
    height: 45px;
    background-color: var(--cyan-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    margin-left: 12px;
}

.brand-info h5 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.brand-info small {
    font-size: 11px;
    color: #90e0ef;
}

.sidebar-menu {
    padding: 15px 10px;
    overflow-y: auto;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #caf0f8;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.menu-item i {
    width: 24px;
    font-size: 16px;
    margin-left: 10px;
}

.menu-item:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
}

.menu-item.active {
    background-color: var(--cyan-primary);
    color: #ffffff;
    font-weight: 600;
}

/* Main Content Layout */
.main-content {
    margin-right: 280px;
    flex-grow: 1;
    padding: 25px;
    min-height: 100vh;
}

/* Header */
.top-header {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.user-profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: #e0f2fe;
    color: var(--cyan-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-left: 12px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
}

.user-role {
    font-size: 11px;
    color: #6c757d;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-time-badge {
    background-color: #f8f9fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #495057;
    border: 1px solid var(--border-color);
}

.btn-icon {
    background: none;
    border: none;
    position: relative;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
}

.notification-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
}

.btn-logout {
    background-color: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background-color: #fca5a5;
}

/* Views Navigation */
.content-view {
    display: none;
}

.content-view.active {
    display: block;
}

.page-title-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #0f3846 0%, #1a5b70 100%);
    border-radius: 16px;
    padding: 25px 35px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(15, 56, 70, 0.15);
}

.banner-text h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.banner-text .subtitle {
    margin-bottom: 5px;
    opacity: 0.9;
}

.banner-text .slogan {
    font-size: 13px;
    color: #90e0ef;
    margin: 0;
}

.banner-icon {
    font-size: 80px;
    opacity: 0.25;
}

/* Stat Cards */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border-right: 4px solid transparent;
}

.stat-card.border-cyan { border-right-color: #00b4d8; }
.stat-card.border-green { border-right-color: #10b981; }
.stat-card.border-blue { border-right-color: #3b82f6; }
.stat-card.border-orange { border-right-color: #f97316; }
.stat-card.border-purple { border-right-color: #8b5cf6; }
.stat-card.border-teal { border-right-color: #14b8a6; }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-left: 15px;
}

.icon-cyan { background-color: #e0f7fa; color: #00b4d8; }
.icon-green { background-color: #d1fae5; color: #10b981; }
.icon-blue { background-color: #dbeafe; color: #3b82f6; }
.icon-orange { background-color: #ffedd5; color: #f97316; }
.icon-purple { background-color: #ede9fe; color: #8b5cf6; }
.icon-teal { background-color: #ccfbf1; color: #14b8a6; }

.stat-title {
    font-size: 12px;
    color: #6c757d;
    display: block;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    margin: 4px 0 0 0;
}

.stat-desc {
    font-size: 11px;
    color: #9ca3af;
}

/* Charts Grid */
.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.chart-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
}

.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.card-header-custom h5 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

/* Panels Row */
.panels-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.act-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.bg-cyan { background-color: #00b4d8; }
.bg-green { background-color: #10b981; }
.bg-purple { background-color: #8b5cf6; }
.bg-orange { background-color: #f97316; }

.act-content {
    flex-grow: 1;
}

.act-content h6 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.act-content p {
    margin: 0;
    font-size: 11px;
    color: #6c757d;
}

.act-time {
    font-size: 11px;
    color: #9ca3af;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-btn {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-btn i {
    font-size: 22px;
    color: var(--cyan-primary);
}

.quick-btn span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
}

.quick-btn:hover {
    background-color: #e0f2fe;
    border-color: var(--cyan-primary);
    transform: translateY(-2px);
}

.btn-cyan {
    background-color: var(--cyan-primary);
    color: #fff;
    border: none;
}

.btn-cyan:hover {
    background-color: var(--cyan-dark);
    color: #fff;
}

.text-cyan {
    color: var(--cyan-primary);
}

/* Custom Table Styling */
.custom-table th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.custom-table td {
    font-size: 13px;
}


/* Phase 7: printable report layout; screen appearance remains unchanged. */
@media print {
  body * { visibility: hidden !important; }
  #view-reports, #view-reports * { visibility: visible !important; }
  #view-reports { position: absolute !important; inset: 0 !important; width: 100% !important; display: block !important; }
  #view-reports .page-title-box button, #view-reports .card:first-of-type { display: none !important; }
  #view-reports .card { box-shadow: none !important; border: 0 !important; }
  #view-reports table { font-size: 9pt !important; }
  #view-reports th, #view-reports td { padding: 4px !important; }
  @page { size: landscape; margin: 12mm; }
}
