/* SAC Document Management - Theme System */

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

/* Default Theme: Sidney Eagles (Maroon) */
:root {
    --primary: #722F37;
    --primary-dark: #5a252c;
    --primary-light: #8b3a44;
}

/* Theme: Sidney Eagles (Maroon) */
[data-theme="eagles"] {
    --primary: #722F37;
    --primary-dark: #5a252c;
    --primary-light: #8b3a44;
}

/* Theme: Navy Blue */
[data-theme="navy"] {
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --primary-light: #3d5166;
}

/* Theme: Forest Green */
[data-theme="forest"] {
    --primary: #2d5016;
    --primary-dark: #1e3610;
    --primary-light: #3d6b1e;
}

/* Theme: Ocean Blue */
[data-theme="ocean"] {
    --primary: #006994;
    --primary-dark: #004d6d;
    --primary-light: #0085ba;
}

/* Theme: Burnt Orange */
[data-theme="orange"] {
    --primary: #bf360c;
    --primary-dark: #8c2809;
    --primary-light: #e64a19;
}

/* Theme: Royal Purple */
[data-theme="purple"] {
    --primary: #4a148c;
    --primary-dark: #38006b;
    --primary-light: #6a1b9a;
}

/* Theme: Slate Gray */
[data-theme="slate"] {
    --primary: #455a64;
    --primary-dark: #37474f;
    --primary-light: #607d8b;
}

/* Theme: Charcoal */
[data-theme="charcoal"] {
    --primary: #333333;
    --primary-dark: #1a1a1a;
    --primary-light: #4d4d4d;
}

body {
    font-family: 'Trebuchet MS', Arial, sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.5;
    font-size: 14px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Layout - Full Width */
#wrapper {
    width: 100%;
    min-height: 100vh;
}

#outer-container {
    width: 100%;
}

#content-container {
    width: 100%;
    padding: 0;
}

/* Header */
#header, #adminheader {
    background: var(--primary);
    padding: 0;
    border-bottom: 3px solid var(--primary-dark);
}

.header-brand {
    padding: 15px 20px;
}

.header-brand h1 {
    color: #fff;
    font-size: 22px;
    font-weight: bold;
}

/* Navigation */
#nav {
    background: var(--primary-dark);
    padding: 0 20px;
}

#nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
}

#nav ul li {
    display: flex;
    align-items: center;
}

#nav ul li a, #nav ul li span, #nav ul li {
    color: #fff;
    font-size: 13px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    height: 100%;
}

#nav ul li a:hover, #nav ul li:hover {
    background: var(--primary-light);
}

#nav ul li.sep {
    padding: 10px 5px;
    opacity: 0.5;
    cursor: default;
}

#nav ul li.sep:hover {
    background: transparent;
}

/* Top Bar - User Info */
#loggedin {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 10px 20px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#loggedin a {
    font-weight: bold;
    margin-right: 15px;
    color: var(--primary);
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.top-bar-item {
    display: flex;
    gap: 5px;
}

.top-bar-label {
    color: #666;
    font-size: 12px;
}

/* Content Layout - Full Width Sidebar */
.content-layout {
    display: flex;
    width: 100%;
}

.left-side {
    width: 220px;
    min-width: 220px;
    background: #fafafa;
    border-right: 1px solid #ddd;
    min-height: calc(100vh - 120px);
}

.right-side {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Navigation Items */
.nav-container {
    padding: 10px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    background: #eee;
    border-left-color: var(--primary);
}

.nav-on {
    background: var(--primary) !important;
    color: #fff !important;
    border-left-color: var(--primary-dark) !important;
}

.nav-click {
    text-decoration: none;
    display: block;
}

.nav-sep {
    height: 1px;
    background: #ddd;
    margin: 10px 20px;
}

/* Buttons */
.btn, .login-button, .search-button, .view-button, .print-button,
.approve-button, .download-print, .save-card-button, .close-card-button,
.close-error-button, .show-button, .big-button {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: bold;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn:hover, .login-button:hover, .search-button:hover, .view-button:hover,
.print-button:hover, .approve-button:hover, .download-print:hover,
.save-card-button:hover, .close-card-button:hover, .close-error-button:hover,
.show-button:hover, .big-button:hover {
    background: var(--primary-dark);
    color: #fff;
}

.show-button {
    padding: 5px 10px;
    font-size: 11px;
}

.big-button {
    display: block;
    padding: 15px 25px;
    margin: 10px;
    font-size: 16px;
}

.close-card-button {
    background: #666;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control, .input-field, .search-field {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    font-family: 'Trebuchet MS', Arial, sans-serif;
}

.form-control:focus, .input-field:focus, .search-field:focus {
    outline: none;
    border-color: var(--primary);
}

select.form-control, #cardSelect, .broker-select {
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
}

/* Tables */
.data-table, .user-table, .general-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table th, .user-table th, .general-table th {
    background: var(--primary);
    color: #fff;
    padding: 10px 15px;
    text-align: left;
    font-weight: bold;
    font-size: 13px;
}

.data-table td, .user-table td, .general-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
}

.even-row {
    background: #fff;
}

.odd-row {
    background: #f9f9f9;
}

.even-row:hover, .odd-row:hover {
    background: #f0f0f0;
}

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

.fat-line {
    border-bottom: 2px solid var(--primary) !important;
    font-weight: bold;
    background: #eee !important;
}

/* Cards & Panels */
.card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 15px;
}

.card-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
}

.panel {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 15px;
}

.panel-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.page-title {
    font-size: 22px;
    font-weight: bold;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* Search Section */
.search-container {
    padding: 20px;
}

.search-form {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    max-width: 100%;
}

.search-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.search-group {
    margin-top: 15px;
}

.search-group label {
    display: block;
    margin-bottom: 8px;
}

.search-results {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
}

.search-results-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

#searchResultsTable {
    width: 100%;
}

/* Approval Section */
.approve-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.card-choice-container {
    margin-top: 15px;
}

.card-area-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.approval-container {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.approval-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

#printOptions {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
}

/* Dialog / Modal */
#dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-container {
    background: #fff;
    border: 1px solid #333;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
}

.dialog-bg {
    position: relative;
}

.dialog-fg {
    position: relative;
}

.dialog-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: #f5f5f5;
}

.dialog-header-title {
    font-size: 16px;
    font-weight: bold;
}

.dialog-header-close-button-container {
    width: 24px;
    height: 24px;
    background: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.dialog-header-close-button-container:hover {
    background: #999;
}

.close-button::before {
    content: 'X';
    font-size: 14px;
    font-weight: bold;
}

.dialog-content-container {
    padding: 20px;
}

#cardArea {
    padding: 0;
}

.payment-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.payment-method-img {
    margin-bottom: 15px;
}

.payment-method-img img {
    max-width: 100%;
}

.input-group {
    margin-bottom: 15px;
}

.payment-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.payment-text input {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
}

.expdate input {
    width: 120px !important;
}

.twentypix {
    height: 20px;
}

.hr {
    border: none;
    border-bottom: 1px solid #ddd;
    margin: 15px 0;
}

/* Error Container */
.bt-error-container {
    display: none;
    padding: 20px;
}

.bt-error-title {
    font-size: 16px;
    font-weight: bold;
    color: #c00;
    margin-bottom: 10px;
}

.bt-error-message-container {
    padding: 15px;
    background: #fff5f5;
    border: 1px solid #fcc;
}

#btError {
    margin-bottom: 15px;
}

/* Wait/Loading Container */
.bt-wait-container {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    justify-content: center;
    align-items: center;
}

.bt-wait {
    text-align: center;
}

/* Profile Section */
.profile-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
}

.profile-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-label {
    width: 120px;
    font-weight: bold;
    color: #666;
}

.profile-value {
    flex: 1;
}

/* Approved/Success Container */
.approved-container {
    padding: 20px;
}

/* Admin Dashboard */
.admin-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
}

.admin-panel {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    flex: 1;
    min-width: 280px;
}

.admin-panel-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* Broker List Layout */
.broker-layout {
    display: flex;
    gap: 20px;
}

.broker-list-section {
    flex: 1;
}

.broker-users-section {
    flex: 2;
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    min-height: 400px;
    max-height: 500px;
    overflow: auto;
}

#brokerUserList {
    padding: 10px;
}

/* Form Layouts */
.form-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 30px;
}

.form-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Date Filter Section */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    color: #666;
}

.filter-select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    font-size: 13px;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

/* Service Request Form */
#sacRequestTable {
    width: 100%;
}

#sacRequestTable td {
    padding: 10px;
    vertical-align: top;
}

.sac-label {
    font-weight: bold;
    width: 150px;
}

.sac-input, .sac-select, .sac-textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    font-family: 'Trebuchet MS', Arial, sans-serif;
}

.sac-textarea {
    min-height: 80px;
    resize: vertical;
}

.sac-request-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
}

.sac-request-submit {
    padding: 10px 30px;
    font-size: 14px;
    font-weight: bold;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
}

.sac-request-submit:hover {
    background: var(--primary-dark);
}

/* Message Pages */
.message-container {
    padding: 30px;
    text-align: center;
}

.message-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
}

.message-text {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Login Page */
.login-container {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 40px;
    width: 100%;
    max-width: 380px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.login-subtitle {
    color: #666;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .btn-primary {
    width: 100%;
    padding: 12px;
}

/* History/Transaction Section */
.transaction-header {
    background: var(--primary);
    color: #fff;
    padding: 10px 15px;
    margin: 15px 0 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-date {
    font-weight: bold;
}

.transaction-id {
    font-size: 12px;
    opacity: 0.8;
}

/* Check Item */
.check-item {
    cursor: pointer;
    vertical-align: middle;
}

.check-item:hover {
    opacity: 0.7;
}

/* Cart Options */
#cartOptions {
    display: none;
    margin-top: 10px;
}

/* Float Utilities */
.float-left { float: left; }
.float-right { float: right; }
.clearfix::after { content: ''; display: table; clear: both; }

/* Spacing Utilities */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

/* Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-accent { color: var(--primary); }
.text-muted { color: #666; }
.font-bold { font-weight: bold; }

/* Link Styles */
.link {
    text-decoration: none;
    color: var(--primary);
}

.link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* Responsive */
@media (max-width: 900px) {
    .content-layout {
        flex-direction: column;
    }

    .left-side {
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .nav-container {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
    }

    .nav-item {
        padding: 10px 15px;
        font-size: 13px;
    }

    .nav-sep {
        display: none;
    }

    .broker-layout {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    #nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    #loggedin {
        flex-direction: column;
        text-align: center;
    }

    .page-header {
        flex-direction: column;
        gap: 10px;
    }

    .filter-bar {
        flex-direction: column;
    }

    .admin-dashboard {
        flex-direction: column;
    }
}

/* Theme Picker */
.theme-picker {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.theme-picker-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.theme-option {
    width: 120px;
    padding: 10px;
    border: 2px solid #ddd;
    cursor: pointer;
    text-align: center;
    background: #fff;
}

.theme-option:hover {
    border-color: #999;
}

.theme-option.active {
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.theme-swatch {
    height: 40px;
    margin-bottom: 8px;
}

.theme-name {
    font-size: 12px;
    font-weight: bold;
}
