/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #fff;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.login-box {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.login-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-login:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
}

/* Dashboard Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: rgba(15, 23, 42, 0.9);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-header p {
    color: #94a3b8;
    font-size: 0.8rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    color: #3b82f6;
}

.menu-item.logout {
    margin-top: 2rem;
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-header h1 {
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.75rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* CRUD Tables */
.crud-section {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-container {
    overflow-x: auto;
}

.crud-table {
    width: 100%;
    border-collapse: collapse;
}

.crud-table th {
    text-align: left;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.9rem;
}

.crud-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.crud-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Form Styles */
.crud-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-full {
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
     /* background: rgba(15, 23, 42, 0.6); */
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1e293b;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================= */
/*  Strike Sense Admin Panel – Complete CSS      */
/* ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.5;
}

/* ---------- Admin Container ---------- */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: 280px;
    background: #1e293b;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #334155;
}

.sidebar-header h2 {
    color: #00d4ff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.sidebar-header p {
    color: #94a3b8;
    font-size: 0.875rem;
}

.sidebar-menu {
    padding: 1.5rem 0;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.menu-item:hover,
.menu-item.active {
    background: #2d3b4f;
    color: white;
    border-left-color: #00d4ff;
}

.menu-item.logout {
    color: #f87171;
}

.menu-item.logout:hover {
    background: #3b2a2a;
    border-left-color: #ef4444;
}

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
}

.content-header h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: black !important;
}

.user-info {
    background: #1e293b;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid #334155;
    color: #cbd5e1;
}

/* ---------- Stats Cards ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: #00d4ff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* ---------- Section Toolbar ---------- */
.section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-toolbar h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.toolbar-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 280px;
    height: 42px;
    padding: 0 1rem 0 2.5rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

.search-wrapper::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #00d4ff 0%, #0a84ff 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #334155;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid #475569;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.125rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
    color: #94a3b8;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #334155;
    color: white;
}

.btn-icon.delete:hover {
    background: #3b2a2a;
    color: #f87171;
}

/* ---------- Tables ---------- */
.table-responsive {
    overflow-x: auto;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 0.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    color: black ;
}

    th{
        color: black !important;
    }

.data-table th {
    text-align: left;
    padding: 1rem 1rem;
    background: #0f172a;
    color: rgb(0, 0, 0) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #334155;
}

.data-table td {
    padding: 1rem 1rem;
    border-bottom: 1px solid #2d3b4f;
    color: #000000 !important;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #a5caff !important;
}

/* ---------- Risk Badges ---------- */
.risk-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.risk-low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.risk-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.risk-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ---------- Rating Stars ---------- */
.rating-stars {
    color: #D4AF37;
    letter-spacing: 2px;
}

/* ---------- Modals ---------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background: #1e293b;
    margin: 2rem auto;
    max-width: 800px;
    width: 90%;
    border-radius: 1rem;
    border: 1px solid #334155;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: modalSlideIn 0.3s ease;
}

.modal-wide .modal-content {
    max-width: 1000px;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid #334155;
}

.modal-header h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.close {
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
   /*  background: #0f172a; */
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: rgb(0, 0, 0) !important;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ---------- Review Text Truncation ---------- */
.review-text {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }
    .sidebar-header h2,
    .sidebar-header p,
    .menu-item span:not(.icon) {
        display: none;
    }
    .menu-item {
        justify-content: center;
        padding: 1rem;
    }
    .main-content {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
    }
    .toolbar-right {
        flex-direction: column;
        width: 100%;
    }
    .search-input {
        width: 100%;
    }
}


/* Add these styles for e-signature management */

/* E-Signature Container */
.esign-container {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Header Actions */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-actions h1 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

/* Generate Button */
.btn-generate {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-generate:hover {
    background: #45a049;
}

.btn-generate:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #333;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 500;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

tr:hover {
    background: #f5f5f5;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Signature Image */
.signature-img {
    max-width: 100px;
    max-height: 50px;
    cursor: pointer;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
    transition: transform 0.3s;
}

.signature-img:hover {
    transform: scale(2);
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Action Buttons */
.action-btn {
    padding: 6px 12px;
    margin: 0 3px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: black !important;
    font-size: 13px;
    display: inline-block;
    text-decoration: none;
}

.btn-view {
    background: #17a2b8;
}

.btn-view:hover {
    background: #138496;
}

.btn-delete {
    background: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
}

/* Status Select */
.status-select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #bbb;
}

/* Responsive */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-generate {
        width: 100%;
        justify-content: center;
    }
    
    td {
        font-size: 14px;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}