﻿/* Full height setup */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Base body styling */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #c2c2c2;
    color: #333;
}

.landing-body {
    background-color: #666666 !important;
    color: #e0e0e0 !important;
}

/* Header and footer container styling */
.hdr-container,
.ftr-container {
    background-color: #666666 !important;
    color: #e0e0e0 !important;
}

/* Navbar styling */
.navbar {
    background-color: #666666 !important;
    border-bottom: 1px solid #444;
}

.navbar-brand,
.navbar-nav .nav-link {
    color: #e0e0e0 !important;
}

.navbar-nav .nav-link:hover {
    color: #b0e57c !important;
}

/* Content container (inside <main>) */
main.flex-grow-1 {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    background-color: #c2c2c2;
    color: #333;
}

/* Inner container (Bootstrap's .container) */
main .container {
    background-color: #c2c2c2;
    color: #333;
}

/* Footer styling */
footer {
    background-color: #666666 !important;
    color: #aaa;
    padding: 1rem 0;
}

/* Cards */
.card {
    background-color: #979797;
    border: 1px solid #666666;
}

.card-header {
    background-color: #555555;
    border-bottom: 1px solid #666;
    color: #e0e0e0;
}

.card-body {
    color: #e0e0e0 !important;
}

/* Form styling */
.form-control {
    color: #444444;
    border: 1px solid #777;
    background-color: #e0e0e0;
}

.form-control:focus {
    color: #444444;
    border-color: #b0e57c;
    box-shadow: 0 0 0 0.2rem rgba(176, 229, 124, 0.25);
    background-color: #c2c2c2;
}

input, select, textarea {
    background-color: #444444;
    color: #e0e0e0;
    border: 1px solid #777;
}

input::placeholder,
textarea::placeholder {
    color: #999;
}

/* Button overrides */
.btn-primary {
    background-color: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

.btn-outline-primary {
    background-color: #5a6268;
    border-color: #4caf50;
    color: #4caf50;
}

.btn-outline-primary:hover {
    background-color: #4caf50;
    color: #fff;
}

.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary:focus {
    background-color: #4caf50 !important;
    border-color: #4caf50 !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25) !important;
}

.btn-primary:hover {
    background-color: #45a049;
    border-color: #45a049;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #777;
}

.btn-outline-secondary:hover {
    background-color: #777;
    color: #fff;
}

/* Alerts */
.alert {
    color: #fff;
    background-color: #365c46;
    border: 1px solid #2e4c3a;
}

/* Tables */
.table {
    color: #e0e0e0;
    background-color: #444444;
}

.table th {
    background-color: #555555;
    color: #e0e0e0;
    border-bottom: 2px solid #666;
}

.table td {
    border-color: #555;
}

.table-hover tbody tr:hover {
    background-color: #555555;
}

/* Horizontal rule */
hr {
    border-color: #555;
}

/* Dashboard specific styles */
.dashboard-stat {
    background-color: #444444;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
}

.dashboard-stat h3 {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.dashboard-stat p {
    color: #aaa;
    margin-bottom: 0;
    min-height: 3.0em; /* Ensures consistent height for one or two lines */
    text-align: center;
}

/* Text colors */
.text-muted {
    color: #aaa !important;
}

/* Border colors */
.border {
    border-color: #555 !important;
}

/* Password strength colors */
.strength-weak { color: #ff6b6b; }
.strength-medium { color: #ffd93d; }
.strength-strong { color: #6bff6b; }
.strength-very-strong { color: #4caf50; }

/* Custom pagination colors for green/grey theme */
.pagination .page-item .page-link {
    color: #4caf50; /* Green text */
    background-color: #e0e0e0; /* Light grey background */
    border: 1px solid #777;
    transition: background 0.2s, color 0.2s;
}

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: #4caf50; /* Green background */
    border-color: #4caf50;
}

.pagination .page-item .page-link:hover,
.pagination .page-item .page-link:focus {
    color: #fff;
    background-color: #45a049; /* Slightly darker green */
    border-color: #45a049;
}

.pagination .page-item.disabled .page-link {
    color: #aaa;
    background-color: #e0e0e0;
    border-color: #777;
    pointer-events: none;
}


.modal-xl-custom {
    max-width: 90%;
    min-width: 1200px;
    padding-top: 60px;
}

.modal-lg-custom {
    max-width: 90%;
    min-width: 900px;
    padding-top: 40px;
}

/* CREDENTIALS MODAL SET UP */

/* OTP and Password Generator Panels for Credential Modal */
#otpPanel,
#passwordGeneratorPanel {
    position: absolute;
    top: -1px;
    bottom: 1px;
    width: 300px;
    display: none;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    z-index: 1055;
    transition: transform 0.3s ease, box-shadow 0.3s;
    overflow-y: auto;
}

#otpPanel {
    left: 0;
    border-right: 1px solid #ddd;
    transform: translateX(-100%);
    border-radius: 8px 0px 0px 8px;
}
#otpPanel.active {
    display: block;
    transform: translateX(0);
}

#passwordGeneratorPanel {
    right: 0;
    border-left: 1px solid #ddd;
    transform: translateX(100%);
    border-radius:0px 8px 8px 0px;
}
#passwordGeneratorPanel.active {
    display: block;
    transform: translateX(0);
}

/* Ensure modal-dialog has position: relative for absolute panels to anchor */
#credentialModal .modal-dialog {
    position: relative;
    transition: max-width 0.3s cubic-bezier(.4,0,.2,1);
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
}
#credentialModal .modal-dialog.with-panel-left,
#credentialModal .modal-dialog.with-panel-right {
    max-width: 880px;
}
#credentialModal .modal-dialog.with-panel-left.with-panel-right {
    max-width: 1220px;
}
#credentialModal .modal-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    position: relative;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0px 1px -1px 1px;
    background: #fff;
    justify-content: center;
}
#credentialModal .side-panel {
    width: 340px;
    background: #fff;
    z-index: 3;
    box-shadow: 0 0 16px rgba(0,0,0,0.08);
    overflow-y: auto;
    display: none;
    flex-direction: column;
    padding: 20px 20px 20px 20px;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s cubic-bezier(.4,0,.2,1);
    opacity: 0;
    pointer-events: none;
    box-sizing: border-box;
    position: relative;
}
#credentialModal .side-panel.left-panel {
    border-right: 1px solid #eee;
    order: 0;
    transform: translateX(-40px);
}
#credentialModal .side-panel.right-panel {
    border-left: 1px solid #eee;
    order: 2;
    transform: translateX(40px);
}
#credentialModal .side-panel.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}
#credentialModal .modal-main {
    flex: 0 0 500px;
    min-width: 0;
    max-width: 500px;
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: #fff;
    z-index: 2;
    order: 1;
}

.flash-green {
    border: 2px solid #28a745 !important;
    box-shadow: 0 0 6px #28a74555;
    transition: border 0.2s, box-shadow 0.2s;
}
.flash-red {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 6px #dc354555;
    transition: border 0.2s, box-shadow 0.2s;
}

.modal-header {
    border-radius: 8px 8px 8px 8px !important;
}