/* ==================== 
   PORTAL SECURITY PAGE
   ==================== */
.portal-security-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
}

.portal-details-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    max-width: 900px;
    /* Wider for details form */
    margin: 40px auto;
    position: relative;
    overflow: hidden;
}

.portal-security-card::before,
.portal-details-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

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

.security-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
    background: rgba(0, 122, 140, 0.1);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    display: inline-block;
}

.portal-security-header h3 {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.portal-security-header p {
    color: #666;
    font-size: 15px;
}

/* Modern Form Elements (Reused from auth styles) */
.modern-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    font-size: 14px;
}

.modern-label i {
    color: var(--primary-color);
}

.modern-input-wrapper {
    position: relative;
}

.modern-input {
    width: 100%;
    padding: 12px 15px 12px 15px;
    /* Adjusted padding since icon is on right via absolute */
    border-radius: 10px;
    border: 2px solid #eee;
    background: #f8f9fa;
    transition: all 0.3s ease;
    height: 50px;
}

.modern-input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 122, 140, 0.1);
    outline: none;
}

.modern-input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modern-input-icon:hover {
    color: var(--primary-color);
}

.btn-modern-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #D1AA2B;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 122, 140, 0.3);
    color: #fff;
}

/* Alerts */
.alert-modern-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-modern-success {
    background: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.3);
    color: #198754;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Validation Styles */
.modern-input.is-invalid {
    border-color: #dc3545 !important;
    background-image: none !important;
}

.modern-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15) !important;
    border-color: #dc3545 !important;
}

.portal-security-card .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 13px;
    color: #dc3545;
    padding-left: 5px;
}

/* Dark Mode for Portal Security */
body.dark-mode .portal-security-card,
body.dark-mode .portal-details-card {
    background: rgba(30, 41, 59, 0.8) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== 
   PORTAL HOME DASHBOARD
   ==================== */

.o_portal_my_home .list-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    border: none !important;
}

.o_portal_my_home .list-group-item {
    background: #fff;
    border: none;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.o_portal_my_home .list-group-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 122, 140, 0.15);
}

/* Add a colored accent line to the left of cards */
.o_portal_my_home .list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    opacity: 0.7;
    transition: width 0.3s ease;
}

.o_portal_my_home .list-group-item:hover::before {
    width: 6px;
    opacity: 1;
}

/* Style the count badge */
.o_portal_my_home .badge {
    background: rgba(0, 122, 140, 0.1);
    color: var(--primary-color);
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
}

/* Dark Mode for Portal Home */
body.dark-mode .o_portal_my_home .list-group-item {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

body.dark-mode .o_portal_my_home .list-group-item .list-group-item-heading,
body.dark-mode .o_portal_my_home .list-group-item .o_portal_docs_count {
    color: #fff !important;
}

body.dark-mode .o_portal_my_home .list-group-item a {
    color: #fff !important;
}

body.dark-mode .o_portal_my_home .badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}



body.dark-mode .portal-security-header h3 {
    color: #fff;
}

/* ==================== 
   PORTAL SIDEBAR
   ==================== */

.o_my_sidebar .o_portal_my_details,
.o_my_sidebar .o_portal_my_security,
.o_my_sidebar .o_my_contact {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.o_my_sidebar h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.o_my_sidebar h4 a {
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-color);
}

.o_my_sidebar hr {
    border-top: 2px solid #f0f2f5;
    margin: 15px 0 20px 0 !important;
}

.o_my_sidebar address {
    margin-bottom: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.o_my_sidebar .fa {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
    margin-right: 5px;
}

/* Dark Mode for Sidebar */
body.dark-mode .o_my_sidebar .o_portal_my_details,
body.dark-mode .o_my_sidebar .o_portal_my_security,
body.dark-mode .o_my_sidebar .o_my_contact {
    background: rgba(30, 41, 59, 0.8) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body.dark-mode .o_my_sidebar h4 {
    color: #fff;
}

body.dark-mode .o_my_sidebar address,
body.dark-mode .o_my_sidebar div,
body.dark-mode .o_my_sidebar span {
    color: #e2e8f0 !important;
}

body.dark-mode .o_my_sidebar h4 a {
    color: var(--accent-color);
}

body.dark-mode .o_my_sidebar hr {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .o_my_sidebar .fa {
    color: var(--accent-color);
}

body.dark-mode .portal-security-header p {
    color: #aaa;
}

body.dark-mode .modern-label {
    color: #ddd;
}

body.dark-mode .modern-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.dark-mode .modern-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .security-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

body.dark-mode .invalid-feedback {
    color: #ff6b6b;
}

/* Dark Mode for Portal Home */
body.dark-mode #wrapwrap.o_portal {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff !important;
}