/* Basic layout styles */
html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: #073318;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 200;
    width: 100%;
    overflow-x: hidden;
}

/* Page container */
.page-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 70px; /* Add space for fixed header */
}

/* Table styles */
table {
    border-collapse: collapse;
    margin: 20px 0;
    background-color: rgba(255, 255, 255, 0.1);
    width: max-content;
    min-width: 100%;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

th {
    background-color: lightgray !important;
    font-weight: bold;
    color: #000;
}

/* Expandable row styles */
.expandable-row {
    cursor: pointer;
}

.expandable-row td:first-child {
    position: relative;
    padding-left: 30px;
}

.expandable-row td:first-child::before {
    content: '▶';
    position: absolute;
    left: 10px;
    transition: transform 0.2s;
}

.expandable-row.expanded td:first-child::before {
    transform: rotate(90deg);
}

.sub-row {
    display: none;
    background-color: rgba(255, 255, 255, 0.05);
}

.sub-row td:first-child {
    padding-left: 50px;
}

/* Nested sub-rows */
.sub-row.sub-row td:first-child {
    padding-left: 70px;
}

.expandable-row.expanded + .sub-row {
    display: table-row;
}

/* Nested expandable rows */
.sub-row.expandable-row td:first-child {
    padding-left: 50px;
}

.sub-row.expandable-row td:first-child::before {
    left: 30px;
}

.sub-row.expandable-row.expanded + .sub-row {
    display: table-row;
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0);
}

tr.no-hover:hover {
    background-color: inherit !important;
}

/* Info Styles */
.info-container {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.info-section {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-section h2 {
    color: #ffba00;
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
}

.info-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 10px;
}

.info-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 10px;
}

@media (max-width: 600px) {
    .info-row-2, .info-row-3 {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    align-content: start;
}

.info-label {
    text-align: left;
    font-weight: bold;
    color: #ffb900;
    margin-top: 0;
}

.info-value {
    color: #ffffff;
    text-align: left;
    margin-top: 0;
}

@media (max-width: 600px) {
    .info-value {
        text-align: right;
    }
}

.status-circle {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.title {
    font-size: 24px;
    color: #ffb900;
    margin-bottom: 20px;
}

.widget-title {
    color: #ffb900;
    font-size: 20px;
    text-align: center;
}

.dc-gold {
    color: #ffba00;
}

.dc-green {
    color: #073318;
}

.spinner {
    border: 4px solid #ffba00;
    border-top: 4px solid #073318;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #666;
    font-style: italic;
}

/* Link styles */
a {
    color: #4CAF50;
    text-decoration: none;
}

a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Button styles */
.w3-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.w3-button:hover {
    background-color: #45a049;
}

/* Section block styles */
.section-block-header {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.section-block-header:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.section-block-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
}

.section-block-content {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 20px;
    margin-top: -20px;
    margin-bottom: 20px;
    border-radius: 0 0 4px 4px;
}

/* Pagination styles */
.pagination {
    margin: 20px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination span {
    color: #fff;
    font-size: 14px;
}

.pagination .w3-button {
    min-width: 100px;
    text-align: center;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 20px;
    color: #fff;
    font-style: italic;
}

.loading-row td {
    text-align: center;
    padding: 20px;
    color: #fff;
    font-style: italic;
}

/* Responsive design */
/* Mobile-first: Small screens (matches W3.CSS breakpoint at 600px) */
@media screen and (max-width: 600px) {
    .page-container {
        margin-left: 0;
        margin-right: 0;
        padding: 10px;
        padding-top: 60px; /* Slightly less padding for mobile */
        width: 100%;
        box-sizing: border-box;
    }
    
    .top-bar {
        padding-right: 5px;
    }
    
    .top-bar .logo {
        height: 40px;
        margin-left: 5px;
    }
    
    .top-bar .user-info {
        font-size: 10px;
    }
    
    .top-bar .user-info a {
        font-size: 10px;
        padding: 1px 3px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .info-section {
        padding: 15px;
    }
    
    /* Make tables more mobile-friendly */
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 6px;
    }
    
    .metric-grid {
        grid-template-columns: 1fr;
    }
    
    /* Prevent horizontal scrolling on mobile */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Ensure containers don't overflow */
    .w3-container, .w3-row, .w3-col {
        max-width: 100%;
    }
    
    /* Make tables scrollable horizontally on mobile if needed */
    .info-section, .info-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Tablet: Medium screens (601px - 768px) */
@media screen and (min-width: 601px) and (max-width: 768px) {
    .page-container {
        margin-left: 2%;
        margin-right: 2%;
        padding: 15px;
        padding-top: 65px;
    }
}

/* Simple Header Tab styles */
.header-tab {
    position: relative;
    display: inline-block;
}

.tab-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #073318;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-tab:hover .tab-menu {
    display: block;
}

.tab-menu a {
    display: block;
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
}

.tab-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Profile Tab styles */
.profile-tab {
    position: relative;
    display: inline-block;
}


.profile-tab-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #073318;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}


.profile-tab-content a {
    display: block;
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
}

.profile-tab-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.metrics-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.metric-group {
    width: 100%;
    max-width: 100%;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
} 