@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* Root variables from dashboard.css */
:root {
    --primary-color: #1D242B;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --info-color: #4895ef;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --text-light: #f8f9fa;
    --text-dark: #212529;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Global reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles merged, using Roboto with fallback to Inter */
body {
    font-family: "Roboto", 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: var(--text-dark);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.5;
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "header"
        "main"
        "footer";
    min-height: 100vh;
}

/* Header */
.header {
    grid-area: header;
    background-color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--box-shadow);
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    margin-right: 1rem;
    cursor: pointer;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    display: none;
    position: relative;
}

.search-box input {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #ddd;
    width: 200px;
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.avatar-image {
    object-fit: cover;
    object-position: center;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1rem;
    transition: transform 0.3s ease, left 0.3s ease;
    position: fixed;
    top: 0;
    left: -240px;
    width: 240px;
    height: 100%;
    z-index: 100;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: block;
}

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

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu .icon {
    width: 20px;
    text-align: center;
}

/* Submenu Styles */

.sidebar-menu .submenu-toggle svg:first-child {
    margin-right: 10px;
}

.sidebar-menu .submenu-arrow {
    transition: transform 0.3s ease;
}

.sidebar-menu .has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-menu .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu .has-submenu.open .submenu {
    max-height: 300px;
}

.sidebar-menu .submenu a {
    display: block;
    padding: 10px 20px 10px 50px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.sidebar-menu .submenu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

@media (min-width: 768px) {
  .dashboard {
    grid-template-columns: 240px 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar main"
        "sidebar footer";
  }

  .dashboard.sidebar-hidden {
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "main"
        "footer";
  }

  .sidebar {
    /* position: relative; */
    left: 0;
    transform: translateX(0);
    transition: transform 0.3s ease;
  }

  .sidebar.hidden {
    transform: translateX(-100%);
  }

  .close-sidebar {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 101;
  }

  .menu-toggle {
    display: block;
  }
}

/* Main Content */
.main-content {
    grid-area: main;
    padding: 1rem;
    overflow-x: hidden;
}

.page-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Cards and Widgets */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-title {
    color: #666;
    font-size: 0.9rem;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(67, 97, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.positive {
    color: #10b981;
}

.negative {
    color: #ef4444;
}

/* Dashboard Widgets */
.widgets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.widget {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.widget-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
}

.widget-btn:hover {
    color: var(--primary-color);
}

/* Chart */
.chart-container {
    width: 100%;
    height: auto;
    position: relative;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    font-weight: 600;
    color: #666;
}

.data-table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-cancelled {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Footer */
.footer {
    grid-area: footer;
    background-color: white;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.overlay.active {
    display: block;
}

/* Notification Styles from */
.notification-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.alert {
    position: relative;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 10px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
    min-width: 250px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.close-btn {
    position: absolute;
    top: 9px;
    right: 5px;
    cursor: pointer;
    font-size: 19px;
    font-weight: bold;
    color: white;
}

.alert-success {
    background-color: #38c172;
}

.alert-error {
    background-color: #e3342f;
}

.alert-info {
    background-color: #3490dc;
}

.alert-warning {
    background-color: #f6993f;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

/* Logo Styles */
.logo-container {
    padding: 1.5rem;
    position: relative;
    width: 100%;
}

.logo-img {
    max-width: 200px;
    height: auto;
}

/* Login Container */
.login-container {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    flex-grow: 1;
    align-items: center;
    justify-content: space-evenly;
}

/* Form Styles */
.login-form {
    width: 100%;
    max-width: 650px;
    padding: 1rem;
}

.login-form h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.login-form p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #6c757d;
}

/* Form Inputs */
.form-control {
    font-size: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

/* Button Styles */
.btn-login {
    background-color: #4F46E5;
    border: none;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.btn-login:hover {
    background-color: #4F46E5;
    color: #fff;
}

/* Links */
.text-danger {
    color: #dc3545;
}

.text-danger:hover {
    text-decoration: underline;
}

/* Image Section */
.login-image {
    width: 100%;
    max-width: 500px;
    padding: 1.5rem;
}

.login-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Typography */
.fw-medium {
    font-weight: 500;
}

/* User Profile Picture */
.user-profile-picture {
    width: 100px;
    height: 125px;
    border-radius: 13px;
}

/* Utilities */
.mt-2 {
    margin-top: 2rem;
}

/* Toggle Password */
.toggle-password {
    right: 10px;
    z-index: 10;
    top: 59px;
}

.toggle-password i {
    color: #6c757d;
}

/* Media Queries */
@media (min-width: 400px) {
    .login-container {
        padding: 1.5rem;
    }

    .login-form {
        padding: 1.5rem;
    }

    .form-control {
        font-size: 1rem;
        padding: 0.75rem;
    }
}

@media (min-width: 576px) {
    .search-box {
        display: flex;
    }

    .user-name {
        display: block;
        font-weight: 400;
        font-size: 18px;
    }

    .user-email {
        display: block;
        font-weight: 400;
        font-size: 12px;
    }

    .logo-container {
        padding: 1.5rem;
    }

    .logo-img {
        max-width: 200px;
    }

    .login-form {
        padding: 1.5rem;
    }

    .login-form h2 {
        font-size: 1.75rem;
    }

    .btn-login {
        font-size: 1.1rem;
        padding: 0.75rem;
    }

    .toggle-password {
        right: 10px;
    }

    .toggle-password i {
        font-size: 1.2rem;
    }
}

@media (min-width: 768px) {
    .login-container {
        flex-direction: row;
        align-items: stretch;
        gap: 2rem;
        padding: 2rem;
    }

    .login-form,
    .login-image {
        width: 50%;
    }

    .login-form {
        padding: 2.5rem;
    }

    .login-image {
        padding: 0;
    }
}

@media (min-width: 992px) {
    .widgets {
        grid-template-columns: 2fr 1fr;
    }
}

.welcome-text {
    font-size: 24px;
    font-weight: bold;
    color: #5d8a9d;
    margin-left: 15px;
    display: inline-block;
    vertical-align: middle;
}

.user-profile {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.edit-profile-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.edit-profile-btn svg {
    color: #666;
}

.edit-profile-btn:hover svg {
    color: #333;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    z-index: 1000;
}

.profile-dropdown {
    top: 100%;
    right: 0;
}

.edit-dropdown {
    top: 135%;
    right: 0px;
    /* Adjust to position dropdown to the left of the pencil icon */
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 10px 20px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
}

.cyber-btn {
    border: 2px solid #5D8A9D;
    color: #5D8A9D;
    border-radius: 5px;
    padding: 0.6rem 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px rgba(93, 138, 157, 0.15);
    background-color: transparent;
    flex: 1 1 200px;
    text-align: center;
}

.cyber-btn:hover {
    background-color: #5D8A9D;
    color: #fff;
    transform: translateY(-2px);
    border-color: #5D8A9D;
}
.cyber-btn-organization {
    border: 2px solid #5D8A9D;
    color: #5D8A9D;
    border-radius: 5px;
    padding: 0.6rem 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px rgba(93, 138, 157, 0.15);
    background-color: transparent;
    text-align: center;
}

.cyber-btn-organization:hover {
    background-color: #5D8A9D;
    color: #fff;
    transform: translateY(-2px);
    border-color: #5D8A9D;
}

.btn-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.notification-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #5D8A9D;
    border: none;
    padding: 1.5rem 0.9rem;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1.25rem;
    text-decoration: none;
}

.notification-btn:hover {
    background-color: rgba(0, 0, 0, 0);
    transform: scale(1.1);
    color: #5D8A9D;
    text-decoration: none;
}

/* Add your media queries for responsive website */
@media (max-width: 991.98px) {
    .stat-cards {
        grid-template-columns: 1fr 1fr;
    }

    .widgets {
        grid-template-columns: 1fr;
    }

    .dashboard {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main"
            "footer";
    }

    .sidebar {
        left: -240px;
        position: fixed;
    }

    .sidebar.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .login-container {
        flex-direction: column;
        padding: 1rem;
    }

    .login-form,
    .login-image {
        width: 100%;
        padding: 1rem 0;
    }

    .stat-cards {
        grid-template-columns: 1fr;
    }

    .widgets {
        grid-template-columns: 1fr;
    }

    .notification-btn {
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .header-right {
        gap: 0.5rem;
        flex-direction: column;
        align-items: flex-end;
    }

    .user-name,
    .user-email {
        font-size: 14px;
    }

    .notification-wrapper {
        top: 10px;
        right: 10px;
    }

    .alert {
        padding: 10px 15px;
        font-size: 0.9rem;
        min-width: 220px;
    }
}

@media (max-width: 399.98px) {
    .login-form h2 {
        font-size: 1.5rem;
    }

    .btn-login {
        font-size: 1rem;
        padding: 0.5rem;
    }

    .form-control {
        font-size: 0.9rem;
    }

    .sidebar-menu a {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

.modern-table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.modern-table tbody td {
    font-size: 0.93rem;
    color: #444;
}

.modern-table tr:hover {
    background-color: #f1f1f1;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.25rem 0.75rem;
    margin: 0 2px;
    border-radius: 0.5rem;
    background: #e9ecef;
    color: #333 !important;
    border: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #5F8EA2 !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.5rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #ced4da;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 0.5rem;
    padding: 0.3rem 0.75rem;
}

.btn-theme {
    background-color: #5F8EA2;
    color: #fff;
    border: none;
}

.btn-theme:hover {
    background-color: #517688;
}

.btn-theme-outline {
    color: #5F8EA2;
    border: 1px solid #5F8EA2;
    background-color: transparent;
}

.btn-theme-outline:hover {
    background-color: #5F8EA2;
    color: #fff;
}


/* .notification-btn {
    position: relative;
    display: inline-block;
} */

.notification-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: red;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
    z-index: 1;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dee2e6;
    cursor: pointer;
    transition: border-color 0.3s;
}

.profile-pic:hover {
    border-color: #0d6efd;
}

.profile-pic-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 3px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s;
}

.profile-pic-placeholder:hover {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.info-label {
    font-weight: 600;
    color: #495057;
}

.info-value {
    color: #212529;
}


.settings-container {
    max-width: 600px;
    /* margin: 20px auto; */
}

.settings-item {
    margin: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.settings-item:hover {
    background-color: #e9ecef;
}

.settings-header {
    padding: 15px 20px;
    font-weight: 500;
    color: #495057;
}

.settings-content {
    padding: 20px;
    background-color: white;
    border-top: 1px solid #dee2e6;
    display: none;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

/* This targets the visible select box */
.select2-container--default .select2-selection--single {
    height: 50px !important;
    padding: 6px 12px;
    font-size: 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

/* Adjust the rendered text inside the box */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
}

/* Adjust the arrow icon vertically */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 50px !important;
    top: 0px !important;
}

.cmp-card {
    /* width: 390px; */
    height: 200px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.cmp-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.cmp-gauge {
    position: relative;
    width: 100%;
    margin: 10px 0;
}

.cmp-chart {
    width: 60%;
    /* transform: rotate(-90deg); */
}

.cmp-circle-bg {
    fill: none;
    stroke: #f1f1f1;
    stroke-width: 3;
}

.cmp-circle {
    fill: none;
    stroke: #5b3cc4;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}

.cmp-percentage {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -40%);
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.cmp-text {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

.dashboard-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    height: 200px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.icon-box {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    font-size: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.icon-sky-blue {
    background-color: #00a5e6;
    color: white;
}

.icon-green {
    background-color: #00987e;
    color: white;
}

.icon-dark-blue {
    background-color: #005aa0;
    color: white;
}

.icon-blue {
    background-color: #32ade6;
    color: white;
}

.card-text-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.card-text-count {
    font-size: 24px;
    font-weight: bold;
    color: #111;
}

@media (max-width: 400px) {
    .cmp-chart {
        width: 50%;
    }
}
