/* Dorcha Chaprasi Styles - Matching Site Aesthetics */

:root {
    --black: #000;
    --white: #fff;
    --gray: #999;
    --dorcha-primary: #1a4d3a;
    --dorcha-secondary: #2d5a3d;
    --dorcha-accent: #4ade80;
    --dorcha-text: #fff;
    --dorcha-text-light: #999;
    --dorcha-bg: #000;
    --dorcha-bg-accent: rgba(255, 255, 255, 0.05);
    --dorcha-border: rgba(255, 255, 255, 0.1);
    --dorcha-shadow: rgba(0, 0, 0, 0.3);
    --dorcha-shadow-hover: rgba(0, 0, 0, 0.5);
}

/* Base body styling */
body {
    font-family: "DM Mono", monospace;
    background: var(--black);
    color: var(--white);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Header styling */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: transparent;
    z-index: 1000;
}

header img {
    height: 40px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    animation: spin-counterclockwise 6s linear infinite;
}

nav a {
    color: var(--white);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.95rem;
}

nav a:hover {
    opacity: 0.6;
}

/* Main content area */
main {
    flex: 1;
    width: 100%;
    overflow-x: hidden;
    padding-top: 80px;
    /* Account for fixed header */
}

/* Animated starfield background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Card styling */
.card {
    border: 1px solid var(--dorcha-border);
    border-radius: 0;
    box-shadow: 0 4px 20px var(--dorcha-shadow);
    transition: all 0.3s ease;
    background: var(--dorcha-bg-accent);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--dorcha-shadow-hover);
    background: rgba(255, 255, 255, 0.08);
}

/* Button styling */
.btn {
    border: 1px solid var(--white);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--black);
    background: var(--white);
    transition: background 0.2s ease;
    border-radius: 0;
    font-family: "DM Mono", monospace;
    font-size: 0.95rem;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.85);
    color: var(--black);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--black);
}

.btn-primary {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--white);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.85);
    color: var(--black);
}

/* Form styling */
.form-control:focus {
    border-color: var(--white);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    background: var(--black);
    color: var(--white);
}

.form-control {
    border-radius: 0;
    border: 1px solid var(--white);
    padding: 12px 16px;
    background: var(--black);
    color: var(--white);
    font-family: "DM Mono", monospace;
    min-width: 0;
    flex: 1;
}

.form-control::placeholder {
    color: var(--gray);
}

.input-group .form-control {
    border-radius: 0;
    border-right: none;
}

.input-group .btn {
    border-radius: 0;
    border: 1px solid var(--white);
    border-left: none;
    background: var(--white);
    color: var(--black);
}

/* Login form specific */
.btn-primary.w-100.py-2.fw-medium {
    border-radius: 0;
    font-size: 0.95rem;
}

/* Text styling */
.text-primary {
    color: var(--white) !important;
}

.text-muted {
    color: var(--gray) !important;
}

.text-dark {
    color: var(--white) !important;
}

.text-white {
    color: var(--white) !important;
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 0;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

/* Service Grid Cards - Modern Elegant Style */
.service-card {
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--dorcha-bg-accent);
    border: 1px solid var(--dorcha-border);
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: var(--white);
}

.service-card a {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
}

.service-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    background: var(--dorcha-bg-accent);
    border: 1px solid var(--dorcha-border);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.service-icon svg {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon svg {
    transform: none;
}

.service-arrow {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.service-card:hover .service-arrow {
    opacity: 1;
    transform: translateX(0);
}

.user-icon {
    color: var(--dorcha-text-light);
    opacity: 0.7;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--white);
    font-family: "DM Mono", monospace;
    line-height: 1.3;
}

.service-description {
    font-size: 0.9rem;
    color: var(--dorcha-text-light);
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

/* Header styling */
.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--dorcha-primary) 0%, var(--dorcha-primary-dark) 100%);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(26, 64, 33, 0.2);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 64, 33, 0.3);
}

/* Badge styling */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 0;
    font-weight: 500;
}

.bg-primary {
    background-color: var(--dorcha-primary) !important;
}

.bg-secondary {
    background-color: var(--dorcha-secondary) !important;
}


/* Services Grid Container */
.services-grid {
    animation: fadeInUp 0.6s ease-out;
}

/* Card entrance animation */
.service-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Responsive adjustments for service cards */
@media (max-width: 768px) {
    .service-card {
        padding: 0.75rem;
        animation-delay: 0s !important;
        min-height: 80px;
    }

    .service-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .service-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .service-card {
        padding: 0.5rem;
        min-height: 70px;
    }

    .service-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .service-title {
        font-size: 0.75rem;
    }
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin-counterclockwise {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

/* Animation for alerts */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Console header styling */
.console-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--dorcha-border);
    margin-bottom: 2rem;
}

/* Container adjustments */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Services grid adjustments */
.services-grid {
    margin-top: 4rem;
}

/* Identity Management Specific Styles */
.identity-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Identity Management form controls - ensure all inputs are unrounded */
.identities-content .form-control {
    border-radius: 0 !important;
}

.identities-content .form-select {
    border-radius: 0 !important;
}

/* Override Bootstrap table styles for dark theme */
.table {
    background-color: transparent !important;
    color: var(--white) !important;
}

.table thead th {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--gray) !important;
}

.table tbody tr {
    background-color: transparent !important;
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.table tbody td {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--white) !important;
}

.table-hover tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.identity-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.identity-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
}

.identity-body {
    padding: 2rem;
}

.identity-table {
    margin: 0;
    color: var(--white);
}

.identity-table thead th {
    border: none;
    color: var(--gray);
    font-weight: 400;
    font-size: 0.9rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.identity-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.identity-table tbody td {
    border: none;
    padding: 1rem 0;
    color: var(--white);
}

.identity-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
}

.identity-badge.human {
    background: var(--white);
    color: var(--black);
}

.identity-badge.api {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.identity-form-control {
    background: var(--black);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-family: "DM Mono", monospace;
}

.identity-form-control:focus {
    border-color: var(--white);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    background: var(--black);
    color: var(--white);
}

.identity-form-control::placeholder {
    color: var(--gray);
}

.identity-label {
    color: var(--white);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.identity-form-text {
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.identity-btn-primary {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-weight: 500;
    transition: all 0.2s ease;
}

.identity-btn-primary:hover {
    background: rgba(255, 255, 255, 0.85);
    color: var(--black);
}

.identity-btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-weight: 500;
    transition: all 0.2s ease;
}

.identity-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.identity-alert {
    border-radius: 0;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.identity-alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.identity-alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #51cf66;
}

.identity-alert-info {
    background: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
    color: #74c0fc;
}

/* Empty state styling */
.identity-empty-state {
    text-align: center;
    padding: 3rem 0;
}

.identity-empty-icon {
    font-size: 3rem;
    color: var(--gray);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.identity-empty-text {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Password Change Specific Styles */
.password-icon {
    color: var(--dorcha-text-light);
    opacity: 0.7;
}

.service-icon-security {
    background: var(--dorcha-bg-accent);
    border-color: var(--dorcha-border);
    color: var(--white);
}

.service-card:hover .service-icon-security {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
}

/* Password strength indicator */
.progress {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Form validation styling */
.form-text {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.text-success {
    color: var(--white) !important;
}

.text-danger {
    color: var(--gray) !important;
}

/* Form label styling for better visibility */
.form-label {
    color: var(--white) !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Password change page specific styling */
.password-change-content .form-label {
    color: var(--white) !important;
    font-weight: 500;
}

.password-change-content .card-title {
    color: var(--white) !important;
    font-weight: 600;
}

.password-change-content .form-text {
    color: var(--gray) !important;
}

.password-change-content .small {
    color: var(--gray) !important;
}

.password-change-content .text-muted {
    color: var(--gray) !important;
}

.password-change-content .list-unstyled li {
    color: var(--white) !important;
}

.password-change-content .text-success {
    color: var(--white) !important;
}

/* Button styling for monochrome palette */
.btn-primary {
    background: var(--white) !important;
    color: var(--black) !important;
    border: 1px solid var(--white) !important;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    color: var(--black) !important;
}

.btn-primary:disabled {
    background: var(--gray) !important;
    color: var(--black) !important;
    border-color: var(--gray) !important;
    opacity: 0.6;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    header img {
        height: 32px;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .service-title {
        font-size: 0.9rem;
    }

    .identity-header {
        padding: 1rem 1.5rem;
    }

    .identity-body {
        padding: 1.5rem;
    }

    .identity-table {
        font-size: 0.9rem;
    }

    .identity-table thead th {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }

    .identity-table tbody td {
        padding: 0.75rem 0;
    }
}