/* Vodafone Brand Colors */
:root {
    --vodafone-red: #e60000;
    --vodafone-dark: #b00000;
    --vodafone-light: #fff;
    --vodafone-grey: #f5f5f5;
}

/* Apply border-box globally to prevent overflow issues */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--vodafone-grey);
    color: #222;
}

.vf-header {
    background: var(--vodafone-red);
    color: var(--vodafone-light);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 100%;
    min-height: 64px;
}
.vf-header-logo {
    height: 44px;
    margin-right: 20px;
}
.vf-header-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 64px;
}
.vf-header-title {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-left: 12px;
}
.vf-submenu {
    width: 100%;
    margin-top: 0;
    background: var(--vodafone-dark);
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}
.vf-submenu ul {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0 0 0 8px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    flex-direction: row;
    min-height: 44px;
}
.vf-submenu .vf-link {
    color: var(--vodafone-light);
    font-weight: 500;
    font-size: 1.05rem;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s;
}
.vf-submenu .vf-link:hover {
    color: #fffbe6;
    text-decoration: underline;
}
.vf-submenu .vf-link.active, .vf-submenu .vf-link[aria-current="page"] {
    background: #fff2f2;
    color: var(--vodafone-red) !important;
    border-radius: 6px 6px 0 0;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(230,0,0,0.06);
}

.vf-footer {
    background: var(--vodafone-red);
    color: var(--vodafone-light);
    text-align: center;
    padding: 16px 0 12px 0;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.vf-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 16px 80px 16px;
}

.vf-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border-radius: 8px;
    overflow: hidden;
}
.vf-table th, .vf-table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85rem;
}
.vf-table th {
    background: var(--vodafone-red);
    color: var(--vodafone-light);
    font-weight: 600;
    border-bottom: 2px solid var(--vodafone-dark);
}
.vf-table tr:nth-child(even) {
    background: var(--vodafone-grey);
}
.vf-table tr:hover {
    background: #ffeaea;
}
.vf-table td {
    border-bottom: 1px solid #eee;
}
.vf-table-small {
    font-size: 0.85rem;
    max-width: 700px;
    min-width: 350px;
    width: 100%;
    margin: 18px auto;
}

.vf-filters {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 4px 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 10px 12px 6px 12px;
    margin-bottom: 18px;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    position: static;
    top: unset;
    z-index: unset;
    min-height: 0;
    height: auto;
}
.vf-filters label {
    font-weight: 500;
    margin-right: 6px;
    color: #b00000;
    font-size: 0.90rem;
    margin-bottom: 0;
}
.vf-filters select, .vf-filters input[type="date"] {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.90rem;
    min-width: 120px;
    background: #fafafa;
    transition: border 0.2s;
    height: 28px;
    margin-bottom: 0;
}
.vf-filters select:focus, .vf-filters input[type="date"]:focus {
    border: 1.5px solid var(--vodafone-red);
    outline: none;
}

/* Center Text Class */
.center-text {
    text-align: center;
}

/* Dashboard and Ticket Table Styles */
.vf-dashboard-container {
    padding: 0;
}
.dashboard-flex-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 360px;
    padding: 32px 0 80px 0; /* Reduced horizontal padding */
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
}
.dashboard-flex-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    min-width: 0;
    width: 100%;
    gap: 18px;
}
#chart-container {
    width: 28%;
    min-width: 0;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}
#ticket-table-container {
    width: 72%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
}
#main, #chart-container, #lead-time-main {
    width: 100%;
    height: auto;
    margin: 40px 0; /* Remove auto centering, use only vertical margin */
}
@media (max-width: 700px) {
    #main, #chart-container, #lead-time-main {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* Ticket Table Styles */
.ticket-table-scroll {
    max-height: 340px;
    overflow-y: auto;
    width: 100%;
}

/* Lead Time Chart Styles */
#lead-time-main {
    width: 100% !important;
    height: 340px;
    margin: 0;
    min-width: 0;
    float: none;
    align-self: flex-start;
    display: block;
}

/* Modal Overlay Styles */
.vf-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: rgba(0,0,0,0.45);
    justify-content: center;
    align-items: center;
}
.vf-modal-content {
    background: #fff;
    margin: 60px auto;
    padding: 24px 18px 18px 18px;
    border-radius: 10px;
    max-width: 800px;
    width: 95vw;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    position: relative;
    min-height: 200px;
}
.vf-modal-close {
    color: var(--vodafone-red);
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1010;
}
@media (max-width: 900px) {
    .vf-modal-content { max-width: 99vw; }
}

/* Logout button in header styled as a link */
.vf-header-welcome form button[type="submit"] {
    color: var(--vodafone-light);
    font-weight: 500;
    font-size: 1.05rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    margin-left: 20px;
    transition: color 0.2s;
}
.vf-header-welcome form button[type="submit"]:hover {
    color: #fffbe6;
    text-decoration: underline;
}
