/* Basic styling to mimic Riteway portal layout */

.riteway-cp-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    min-height: 600px;
}

/* Sidebar */

.riteway-cp-sidebar {
    width: 90px;
    background: #22252b;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: 20px;
}

.riteway-cp-sidebar .logo {
    text-align: center;
    margin-bottom: 30px;
}

.riteway-cp-sidebar .nav {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.riteway-cp-sidebar .nav li {
    text-align: center;
}

.riteway-cp-sidebar .nav a {
    display: block;
    padding: 14px 8px;
    color: #d7d7d7;
    text-decoration: none;
    font-size: 13px;
}

.riteway-cp-sidebar .nav a.active,
.riteway-cp-sidebar .nav a:hover {
    background: #c0392b;
    color: #fff;
}

/* Main */

.riteway-cp-main {
    flex: 1;
    background: #2f3238;
    color: #fff;
    min-height: 100%;
}

.riteway-cp-main-header {
    background: #b62d24;
    padding: 14px 30px;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
}

.riteway-cp-main-inner {
    background: #f4f4f4;
    color: #333;
    padding: 25px 40px 40px;
}

/* Sections */

.riteway-section {
    margin-bottom: 40px;
}

.riteway-section-header {
    background: #4b4e55;
    color: #fff;
    padding: 10px 20px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 15px;
}

.riteway-section-body {
    background: #fff;
    padding: 20px;
}

/* Buttons */

.riteway-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #b62d24;
    color: #fff;
    border-radius: 3px;
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.riteway-btn.secondary {
    background: #4b4e55;
}

.riteway-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Tables */

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

.riteway-table th,
.riteway-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.riteway-table th {
    text-align: left;
    font-weight: 600;
}

/* Login form */

.riteway-login-wrapper {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    padding: 30px 30px 35px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.riteway-login-wrapper h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.riteway-login-wrapper label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.riteway-login-wrapper input[type="text"],
.riteway-login-wrapper input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 3px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    font-size: 14px;
}

.riteway-login-error {
    margin-bottom: 15px;
    padding: 10px;
    background: #ffebe8;
    border: 1px solid #c00;
    color: #c00;
    font-size: 13px;
}

.riteway-empty {
    font-style: italic;
    font-size: 14px;
}

/* Modal (order new sign) */

.riteway-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.riteway-modal {
    width: 900px;
    max-width: 95%;
    background: #f4f4f4;
    border-radius: 4px;
    overflow: hidden;
}

.riteway-modal-header {
    background: #b62d24;
    color: #fff;
    padding: 12px 20px;
    font-weight: 600;
}

.riteway-modal-body {
    padding: 20px 25px;
    max-height: 80vh;
    overflow-y: auto;
}

.riteway-modal-footer {
    padding: 12px 20px 18px;
    text-align: right;
    background: #f0f0f0;
}

.riteway-field-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.riteway-field {
    flex: 1;
}

.riteway-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.riteway-field input,
.riteway-field select,
.riteway-field textarea {
    width: 100%;
    padding: 7px 9px;
    border-radius: 3px;
    border: 1px solid #ccc;
    font-size: 13px;
}

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

.riteway-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .riteway-cp-wrapper {
        flex-direction: column;
    }
    .riteway-cp-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        height: auto;
    }
    .riteway-cp-main-header {
        font-size: 16px;
        padding: 10px 15px;
    }
    .riteway-field-row {
        flex-direction: column;
    }
}
