/* --- GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #0b0d13;
    color: #f1f3f9;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Glassmorphism utility card styling */
.card {
    background: rgba(18, 22, 35, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 106, 0, 0.3);
    box-shadow: 0 8px 32px 0 rgba(255, 106, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #e2e8f0;
}

.icon-accent {
    color: #ff6a00;
    font-size: 1.3rem;
}

/* --- MAIN LAYOUT (16:9 optimization) --- */
.dashboard-container {
    display: grid;
    grid-template-rows: 90px 1fr 50px;
    width: 100%;
    height: 100%;
    padding: 10px 15px;
    gap: 15px;
}

/* --- HEADER --- */
.header {
    background: rgba(18, 22, 35, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 3px solid #ff6a00;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

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

.logo-img {
    height: 60px;
    width: 60px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid #ff6a00;
    background-color: #fef08a; /* Soft yellow matching the logo background */
    box-shadow: 0 0 10px rgba(255, 106, 0, 0.4);
}

.logo-text h1 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ff6a00;
    text-shadow: 0 0 10px rgba(255, 106, 0, 0.3);
}

.logo-text .subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 1px;
}

.header-clock-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.date-text {
    font-size: 0.95rem;
    color: #007bff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clock-text {
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    font-family: monospace;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* --- MAIN CONTENT LAYOUT --- */
.main-content {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 15px;
    height: 100%;
    overflow: hidden;
}

.col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

/* --- LEFT COLUMN --- */
/* Weather Card */
.weather-card {
    flex: 0.8;
}

.weather-body {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex: 1;
    padding: 5px 0;
}

.weather-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#temp-display {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.weather-large-icon {
    font-size: 2.2rem;
    color: #38bdf8;
    margin-top: 3px;
    animation: float-icon 3s ease-in-out infinite alternate;
}

@keyframes float-icon {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.weather-details p {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-details p i {
    color: #007bff;
}

/* Dispatch Card & Table */
.dispatch-card {
    flex: 2.2;
    overflow: hidden;
}

.dispatch-body {
    flex: 1;
    overflow-y: auto;
    margin-top: 5px;
}

/* Hide scrollbar but keep functionality */
.dispatch-body::-webkit-scrollbar {
    display: none;
}

.dispatch-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.dispatch-table th {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 8px 5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dispatch-table td {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f1f3f9;
    padding: 11px 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

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

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    text-align: center;
    width: 80px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.status-going {
    background: rgba(255, 106, 0, 0.15);
    color: #ff6a00;
    border: 1px solid rgba(255, 106, 0, 0.3);
    box-shadow: 0 0 5px rgba(255, 106, 0, 0.1);
}

.status-arrived {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.1);
}

.status-waiting {
    background: rgba(0, 123, 255, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(0, 123, 255, 0.3);
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.1);
}


/* --- CENTER COLUMN --- */
/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(90deg, rgba(255, 106, 0, 0.2) 0%, rgba(0, 123, 255, 0.1) 100%);
    border: 1px solid rgba(255, 106, 0, 0.3);
    border-left: 5px solid #ff6a00;
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.welcome-icon {
    font-size: 2rem;
    color: #ff6a00;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.1); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

.welcome-text p {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1px;
}

.welcome-text h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Image Slider */
.slider-container {
    flex: 1;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img, .slide video, .slider-media-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(11, 13, 19, 0.95) 0%, rgba(11, 13, 19, 0) 100%);
    padding: 30px 20px 20px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 2;
}

.slider-dots {
    position: absolute;
    bottom: 25px;
    right: 20px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #ff6a00;
    width: 25px;
    border-radius: 5px;
    box-shadow: 0 0 8px #ff6a00;
}


/* --- RIGHT COLUMN --- */
/* News Card */
.news-card {
    flex: 2;
    overflow: hidden;
}

.news-list-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    margin-top: 5px;
}

.news-list {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid #007bff;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    transition: background 0.3s;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.news-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: #007bff;
    text-transform: uppercase;
    display: block;
    margin-bottom: 3px;
}

.news-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    color: #e2e8f0;
}

/* Visitor Card & Table */
.visitor-card {
    flex: 1.2;
    overflow: hidden;
    border-left: 3px solid #ff6a00;
}

.visitor-body {
    flex: 1;
    overflow-y: auto;
    margin-top: 5px;
}

.visitor-body::-webkit-scrollbar {
    display: none;
}

.visitor-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.visitor-table th {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 6px 4px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.visitor-table td {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f1f3f9;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

/* Center align the 'Đối tác' column */
.visitor-table th:nth-child(2),
.visitor-table td:nth-child(2) {
    text-align: center;
}

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

.visitor-time {
    color: #ff6a00;
    font-weight: 800;
    font-family: monospace;
    font-size: 1.25rem;
}


/* --- FOOTER: MARQUEE RUNNING TEXT --- */
.footer {
    background: rgba(18, 22, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0 15px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.marquee-title {
    background: #ff6a00;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 6px;
    margin-right: 15px;
    z-index: 10;
    letter-spacing: 0.5px;
    box-shadow: 0 0 8px rgba(255, 106, 0, 0.4);
}

.marquee-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.marquee-text {
    white-space: nowrap;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #e2e8f0;
    animation: marquee-scroll 50s linear infinite;
}

@keyframes marquee-scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
