/* static/css/rmc.css - RMC Module Styles */

:root {
    --gold: #D4AF37;
    --gold-light: #F4E4BC;
    --dark-bg: #1a1a1a;
    --darker-bg: #0d0d0d;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    padding: 20px;
}

.login-box {
    background: var(--darker-bg);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
}

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

.login-logo {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
}

.login-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-white);
    margin-bottom: 10px;
}

.login-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-gray);
}

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

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.login-footer p {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.login-footer a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--gold-light);
}

.error-message {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 12px;
    border-radius: 4px;
    margin-top: 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-align: center;
}

.error-message.hidden {
    display: none;
}

/* RMC Portal Header */
.rmc-portal-header {
    padding: 80px 0 40px;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.rmc-header-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.rmc-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 13, 13, 0.85) 0%, rgba(26, 26, 26, 0.9) 100%);
    z-index: 1;
}

.rmc-portal-header .section-container {
    position: relative;
    z-index: 2;
}

.rmc-portal-logo {
    height: 120px;
    width: auto;
    margin: 20px auto;
    display: block;
}

.rmc-portal-header .section-title {
    font-size: 3rem;
    margin-bottom: 15px;
}

.rmc-portal-header .section-description {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-gray);
}

/* RMC Admin Header */
.rmc-admin-header {
    padding: 40px 0;
    background: var(--dark-bg);
}

/* Tabs Section */
.rmc-tabs-section {
    background: var(--dark-bg);
    padding: 20px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.rmc-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rmc-tab {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rmc-tab:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
}

.rmc-tab.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--dark-bg);
}

/* Tab Content */
.rmc-tab-content {
    display: none;
    padding: 40px 0;
    background: var(--dark-bg);
    min-height: 600px;
}

.rmc-tab-content.active {
    display: block;
}

/* RMC Panel */
.rmc-panel {
    background: var(--darker-bg);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(212, 175, 55, 0.05);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-white);
    margin: 0;
}

.panel-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 8px 16px;
    background: var(--dark-bg);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
}

.panel-body {
    padding: 30px;
}

/* RMC Form */
.rmc-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--dark-bg);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    border-radius: 4px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-gray);
}

/* Order Items */
.order-item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.order-item-row select,
.order-item-row input {
    padding: 12px;
    box-sizing: border-box;
}

.btn-remove-item {
    width: 36px;
    height: 36px;
    background: var(--danger);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-item:hover {
    background: #c82333;
}

/* Order Summary */
.order-summary {
    background: rgba(212, 175, 55, 0.05);
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-white);
}

.summary-row span:last-child {
    color: var(--gold);
    font-weight: 700;
}

/* RMC List */
.rmc-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rmc-list-item {
    background: var(--dark-bg);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 6px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.rmc-list-item:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.item-main {
    flex: 1;
}

.item-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-white);
    margin-bottom: 8px;
}

.item-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.item-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.item-meta span {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-gray);
}

.item-meta strong {
    color: var(--gold);
}

.item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.item-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning);
}

.status-approved {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success);
}

.status-in-production {
    background: rgba(23, 162, 184, 0.2);
    color: var(--info);
}

.status-dispatched {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

.status-delivered {
    background: rgba(40, 167, 69, 0.3);
    color: var(--success);
}

.status-cancelled {
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger);
}

.status-sent {
    background: rgba(23, 162, 184, 0.2);
    color: var(--info);
}

.status-paid {
    background: rgba(40, 167, 69, 0.3);
    color: var(--success);
}

.status-overdue {
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger);
}

/* Dashboard Stats Grid */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--darker-bg);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.report-card {
    background: var(--dark-bg);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

.report-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-white);
    margin-bottom: 10px;
}

.report-card p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--darker-bg);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large-modal {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-white);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--gold);
}

.modal-content .rmc-form {
    padding: 30px;
}

/* Order Detail Content */
.order-detail-content {
    padding: 30px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.detail-row span:first-child {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.detail-row span:last-child {
    color: var(--text-white);
    font-weight: 500;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
}

.order-items-table th,
.order-items-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.order-items-table th {
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.order-items-table td {
    font-family: var(--font-body);
    color: var(--text-white);
    font-size: 0.9rem;
}

.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — rmc.css
   ═══════════════════════════════════════════════════════════ */

/* ── Tablets ≤ 992px ───────────────────────────────────── */
@media (max-width: 992px) {
    .form-row                    { grid-template-columns: 1fr; }
    .order-item-row              { grid-template-columns: 1fr 1fr; gap: 8px; }
    .rmc-list-item               { flex-direction: column; align-items: flex-start; gap: 15px; }
    .item-actions                { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .dashboard-stats-grid        { grid-template-columns: 1fr 1fr; }
    .reports-grid                { grid-template-columns: 1fr 1fr; }
    .panel-header                { flex-wrap: wrap; gap: 10px; }
    .panel-actions               { width: 100%; }
    .filter-select               { width: 100%; }
    .modal-content.large-modal   { max-width: 95vw; }
    .rmc-portal-header .section-title { font-size: 2.2rem; }
    .rmc-portal-logo             { height: 90px; }
    .section-container           { padding: 60px 20px; }
}

/* ── Mobile ≤ 768px ─────────────────────────────────────── */
@media (max-width: 768px) {
    /* Nav tabs — horizontal scroll */
    .rmc-tabs                    { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 6px; padding-bottom: 4px; }
    .rmc-tab                     { flex-shrink: 0; font-size: 0.75rem; padding: 9px 12px; letter-spacing: 0.5px; white-space: nowrap; }

    /* Stats */
    .dashboard-stats-grid        { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card                   { padding: 16px; gap: 12px; }
    .stat-icon                   { font-size: 1.8rem; }
    .stat-value                  { font-size: 1.5rem; }
    .stat-label                  { font-size: 0.72rem; }

    /* Reports */
    .reports-grid                { grid-template-columns: 1fr; }

    /* Form */
    .form-row                    { grid-template-columns: 1fr; }
    .order-item-row              { grid-template-columns: 1fr; }
    .order-summary               { padding: 14px; }
    .summary-row                 { font-size: 1rem; }

    /* Panel */
    .panel-header                { flex-direction: column; align-items: flex-start; padding: 14px 16px; gap: 10px; }
    .panel-body                  { padding: 14px 16px; }

    /* List items */
    .rmc-list-item               { padding: 14px; }
    .item-title                  { font-size: 1rem; }
    .item-actions                { width: 100%; flex-wrap: wrap; gap: 8px; }
    .item-status                 { font-size: 0.7rem; padding: 5px 10px; }

    /* Buttons */
    .order-actions               { flex-direction: column; }
    .order-actions .btn-gold,
    .order-actions .btn-outline  { width: 100%; justify-content: center; }

    /* Modal */
    .modal-content               { width: 96vw; max-height: 90vh; margin: 0 auto; }
    .modal-header                { padding: 14px 16px; }
    .modal-content .rmc-form     { padding: 14px 16px; }
    .modal-header h3             { font-size: 1.1rem; }

    /* RMC Portal Hero */
    .rmc-portal-header           { padding: 60px 0 30px; min-height: auto; }
    .rmc-portal-logo             { height: 70px; }
    .rmc-portal-header .section-title { font-size: 1.7rem; }

    /* Table inside panels */
    .order-items-table           { font-size: 0.82rem; }
    .order-items-table th,
    .order-items-table td        { padding: 8px; }

    /* Login */
    .login-box                   { padding: 24px 16px; max-width: 100%; }
    .login-title                 { font-size: 1.6rem; }
    .login-container             { padding: 16px; }
    .login-footer                { padding-top: 16px; }

    /* Report card */
    .report-card                 { padding: 18px; }
    .report-card h3              { font-size: 1.1rem; }

    /* Billing/Expense tab in rmc_admin */
    .be-quick-actions            { flex-direction: column; width: 100%; }
    .btn-logout-quick,
    .btn-home-quick              { width: 100%; justify-content: center; }
    .dashboard-header-row        { flex-direction: column; align-items: flex-start; gap: 14px; }

    /* Section container */
    .section-container           { padding: 36px 14px; }
}

/* ── Small Mobile ≤ 576px ───────────────────────────────── */
@media (max-width: 576px) {
    .dashboard-stats-grid        { grid-template-columns: 1fr; }
    .rmc-tab                     { font-size: 0.7rem; padding: 8px 10px; }
    .stat-value                  { font-size: 1.3rem; }
    .panel-header h2             { font-size: 1.2rem; }
    .filter-select               { font-size: 0.85rem; }
    .login-box                   { padding: 18px 12px; }
    .login-title                 { font-size: 1.4rem; }
    .modal-content               { width: 100vw; border-radius: 0; max-height: 100vh; }
    .section-container           { padding: 28px 12px; }
}

