/* =============================================
   Opp Registration Program - Version 0.2
   Cartel Communication Systems Inc.
   ============================================= */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Banner ---- */
.banner {
    width: 100%;
    background-color: #025172;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    flex-shrink: 0;
}

.banner .logo {
    width: 240px;
    height: auto;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.banner h1 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
}

/* ---- Page Header (sub-pages) ---- */
.page-header {
    width: 100%;
    background-color: #025172;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px 14px;
    flex-shrink: 0;
}

.page-header .logo {
    width: 240px;
    height: auto;
    margin-bottom: 10px;
}

.page-header h1 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 0;
}

/* Sub-navigation bar beneath the main banner on sub-pages */
.sub-nav {
    width: 100%;
    background-color: #03394f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 30px;
    flex-shrink: 0;
}

.sub-nav .page-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.sub-nav .spacer {
    flex: 1;
}

.sub-nav .user-info {
    color: #cde3ee;
    font-size: 13px;
    margin-right: 15px;
}

.sub-nav .back-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 4px;
    transition: background 0.2s;
}

.sub-nav .back-link:hover {
    background: rgba(255,255,255,0.3);
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
}

.main-content.top-align {
    align-items: flex-start;
    padding-top: 40px;
}

/* ---- Login Box ---- */
.login-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    padding: 40px 36px 30px;
    width: 380px;
    max-width: 95%;
    text-align: center;
}

.login-box h2 {
    color: #025172;
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 600;
}

.login-box .form-group {
    margin-bottom: 18px;
    text-align: left;
}

.login-box label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

.login-box input[type="email"],
.login-box input[type="password"],
.login-box input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.login-box input:focus {
    border-color: #025172;
    outline: none;
    box-shadow: 0 0 0 2px rgba(2,81,114,0.15);
}

.login-box .btn-login {
    width: 100%;
    padding: 11px;
    background-color: #025172;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: background-color 0.2s;
}

.login-box .btn-login:hover {
    background-color: #03729e;
}

.login-box .register-link {
    display: inline-block;
    margin-top: 14px;
    color: #025172;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.login-box .register-link:hover {
    text-decoration: underline;
}

.login-box .auth-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 12px;
}

/* ---- Form Container (Registration, Add User, etc.) ---- */
.form-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 30px 36px;
    width: 600px;
    max-width: 95%;
}

.form-container h2 {
    color: #025172;
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 600;
    text-align: center;
}

.form-container .form-group {
    margin-bottom: 16px;
}

.form-container label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
}

.form-container label .required {
    color: #d32f2f;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-container input:focus,
.form-container select:focus {
    border-color: #025172;
    outline: none;
    box-shadow: 0 0 0 2px rgba(2,81,114,0.12);
}

.form-container input[readonly] {
    background-color: #f5f5f5;
    color: #666;
}

.form-container .field-error {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 2px rgba(211,47,47,0.15) !important;
}

.form-container .error-text {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 3px;
}

.form-container .btn-submit {
    width: 100%;
    padding: 11px;
    background-color: #025172;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.form-container .btn-submit:hover {
    background-color: #03729e;
}

.form-container .form-row {
    display: flex;
    gap: 14px;
}

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

/* ---- Menu / Dashboard ---- */
.dashboard-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 36px 40px;
    width: 500px;
    max-width: 95%;
    text-align: center;
}

.dashboard-container h2 {
    color: #025172;
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

.dashboard-container .welcome {
    color: #666;
    font-size: 14px;
    margin-bottom: 28px;
}

.dashboard-container .menu-list {
    list-style: none;
    padding: 0;
}

.dashboard-container .menu-list li {
    margin-bottom: 10px;
}

.dashboard-container .menu-list a {
    display: block;
    padding: 13px 20px;
    background-color: #025172;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
}

.dashboard-container .menu-list a:hover {
    background-color: #03729e;
    transform: translateY(-1px);
}

.dashboard-container .menu-list a.logout-btn {
    background-color: #b71c1c;
}

.dashboard-container .menu-list a.logout-btn:hover {
    background-color: #d32f2f;
}

/* ---- Alert / Error / Success Boxes ---- */
.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-error {
    background-color: #fdecea;
    color: #611a15;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.alert-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

/* ---- Modal / Pop-up ---- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-box h3 {
    color: #025172;
    margin-bottom: 16px;
    font-size: 18px;
}

.modal-box .confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.modal-box .confirm-row .label {
    font-weight: 600;
    color: #555;
    width: 40%;
}

.modal-box .confirm-row .value {
    color: #333;
    width: 58%;
    text-align: right;
}

.modal-box .modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.modal-box .btn-yes {
    padding: 10px 28px;
    background-color: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.modal-box .btn-yes:hover { background-color: #388e3c; }

.modal-box .btn-edit {
    padding: 10px 28px;
    background-color: #f57c00;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.modal-box .btn-edit:hover { background-color: #fb8c00; }

.modal-box .btn-ok {
    padding: 10px 28px;
    background-color: #025172;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.modal-box .btn-ok:hover { background-color: #03729e; }

/* ---- Data Tables ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 13px;
}

.data-table thead {
    background-color: #025172;
    color: #fff;
}

.data-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 500;
}

.data-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #e8e8e8;
}

.data-table tbody tr:hover {
    background-color: #f5f9fc;
}

.data-table .action-link {
    color: #025172;
    text-decoration: none;
    font-weight: 500;
    margin-right: 8px;
}

.data-table .action-link:hover {
    text-decoration: underline;
}

.data-table .action-link.danger {
    color: #c62828;
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }

.version-tag {
    text-align: center;
    color: #aaa;
    font-size: 11px;
    padding: 10px;
}

/* ---- Wide Container for tables ---- */
.wide-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 30px 36px;
    width: 900px;
    max-width: 95%;
}

.wide-container h2 {
    color: #025172;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .banner h1, .page-header h1 { font-size: 16px; }
    .banner .logo, .page-header .logo { width: 160px; }
    .form-container .form-row { flex-direction: column; gap: 0; }
    .login-box { padding: 28px 24px 22px; }
    .form-container { padding: 24px 20px; }
    .sub-nav { flex-wrap: wrap; gap: 6px; }
}
