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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fef7ff 0%, #faf5ff 50%, #fdf2f8 100%);
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.08);
    overflow: hidden;
    border: 1px solid rgba(236, 72, 153, 0.15);
}

.header {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.95) 0%, rgba(168, 85, 247, 0.95) 100%);
    color: #ffffff;
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(244, 114, 182, 0.2);
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.logo {
    height: 60px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    border-radius: 10px;
}

.header-subtitle {
    font-size: 0.9em;
    opacity: 0.95;
    margin-top: 8px;
    font-weight: 500;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.nav {
    background: linear-gradient(135deg, #fef7ff 0%, #faf5ff 100%);
    padding: 0;
    border-bottom: 1px solid rgba(244, 114, 182, 0.2);
    position: relative;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 12px;
    margin: 8px 15px;
    gap: 5px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav li {
    flex: 1;
}

.nav a {
    display: block;
    padding: 15px 10px;
    text-decoration: none;
    color: #a78bfa;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    white-space: nowrap;
}

.nav a:hover, .nav a.active {
    background: linear-gradient(135deg, rgba(252, 231, 243, 0.6) 0%, rgba(243, 232, 255, 0.6) 100%);
    color: #c084fc;
    border-bottom-color: #c084fc;
}

.content {
    padding: 20px 15px;
}

.page-title {
    font-size: 1.5em;
    color: #a78bfa;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(236, 72, 153, 0.2);
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.9) 0%, rgba(168, 85, 247, 0.9) 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid rgba(236, 72, 153, 0.3);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 3px;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.15);
    width: 100%;
    text-align: center;
}

.btn:hover {
    background: linear-gradient(135deg, rgba(219, 39, 119, 0.95) 0%, rgba(147, 51, 234, 0.95) 100%);
    border-color: rgba(219, 39, 119, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.85) 0%, rgba(225, 29, 72, 0.85) 100%);
    border-color: rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.95) 0%, rgba(190, 18, 60, 0.95) 100%);
    border-color: rgba(225, 29, 72, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.85) 0%, rgba(5, 150, 105, 0.85) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.95) 0%, rgba(4, 120, 87, 0.95) 100%);
    border-color: rgba(5, 150, 105, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.85) 0%, rgba(217, 119, 6, 0.85) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.95) 0%, rgba(180, 83, 9, 0.95) 100%);
    border-color: rgba(217, 119, 6, 0.4);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #a78bfa;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid rgba(244, 114, 182, 0.3);
    border-radius: 10px;
    font-size: 16px;
    background: #ffffff;
    color: #374151;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c084fc;
    box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.1);
    background: #fef7ff;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(244, 114, 182, 0.1);
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(236, 72, 153, 0.5);
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 72, 153, 0.7);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(244, 114, 182, 0.15);
}

thead {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.9) 0%, rgba(168, 85, 247, 0.9) 100%);
    color: #ffffff;
}

th, td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(252, 231, 243, 0.5);
    font-size: 14px;
    word-wrap: break-word;
}

th {
    font-size: 13px;
    white-space: nowrap;
}

tbody tr:hover {
    background: linear-gradient(135deg, rgba(254, 247, 255, 0.8) 0%, rgba(250, 245, 255, 0.8) 100%);
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.badge-success {
    background: linear-gradient(135deg, rgba(209, 250, 229, 0.9) 0%, rgba(167, 243, 208, 0.9) 100%);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.9) 0%, rgba(253, 230, 138, 0.9) 100%);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.9) 0%, rgba(254, 202, 202, 0.9) 100%);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9) 0%, rgba(191, 219, 254, 0.9) 100%);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.92) 0%, rgba(168, 85, 247, 0.92) 100%);
    color: #ffffff;
    padding: 18px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(244, 114, 182, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.98) 0%, rgba(168, 85, 247, 0.98) 100%);
}

.stat-card h3 {
    font-size: 1.8em;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat-card p {
    font-size: 0.85em;
    opacity: 0.9;
    line-height: 1.3;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(209, 250, 229, 0.8) 0%, rgba(167, 243, 208, 0.8) 100%);
    color: #047857;
    border: 1.5px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.8) 0%, rgba(254, 202, 202, 0.8) 100%);
    color: #b91c1c;
    border: 1.5px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.8) 0%, rgba(191, 219, 254, 0.8) 100%);
    color: #1e40af;
    border: 1.5px solid rgba(59, 130, 246, 0.3);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.8) 0%, rgba(253, 230, 138, 0.8) 100%);
    color: #92400e;
    border: 1.5px solid rgba(245, 158, 11, 0.3);
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Mobile-friendly utilities */
.mobile-full {
    width: 100%;
}

.mobile-hide {
    display: block;
}

.mobile-show {
    display: none;
}

/* Touch-friendly buttons */
.btn:active {
    transform: scale(0.98);
}

/* Better form spacing on mobile */
.form-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .container {
        border-radius: 10px;
    }
    
    .header {
        padding: 15px 10px;
    }
    
    .logo {
        height: 50px;
    }
    
    .header-subtitle {
        font-size: 0.8em;
        margin-top: 5px;
    }
    
    .nav {
        position: relative;
    }
    
    .nav {
        min-height: 50px;
    }
    
    .nav-toggle {
        display: flex;
        position: absolute;
        right: 5px;
        top: 5px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
    }
    
    .nav-toggle:active {
        transform: scale(0.95);
    }
    
    .nav-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: linear-gradient(135deg, #fef7ff 0%, #faf5ff 100%);
        box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
        z-index: 1000;
        border-top: 1px solid rgba(244, 114, 182, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-menu.active {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
    }
    
    .nav li {
        flex: none;
        width: 100%;
        border-bottom: 1px solid rgba(244, 114, 182, 0.1);
    }
    
    .nav a {
        padding: 16px 20px;
        font-size: 15px;
        text-align: left;
        border-bottom: none;
        border-left: 4px solid transparent;
        display: flex;
        align-items: center;
        min-height: 50px;
    }
    
    .nav a.active {
        border-left-color: #c084fc;
        border-bottom: none;
        background: linear-gradient(135deg, rgba(252, 231, 243, 0.8) 0%, rgba(243, 232, 255, 0.8) 100%);
        color: #c084fc;
        font-weight: 600;
    }
    
    .nav a:hover {
        background: linear-gradient(135deg, rgba(252, 231, 243, 0.6) 0%, rgba(243, 232, 255, 0.6) 100%);
        border-left-color: #c084fc;
    }
    
    .nav a:active {
        background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    }
    
    .content {
        padding: 15px 10px;
    }
    
    .page-title {
        font-size: 1.3em;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    
    .btn {
        padding: 14px 16px;
        font-size: 15px;
        margin: 5px 0;
        width: 100%;
        display: block;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-card h3 {
        font-size: 1.5em;
        margin-bottom: 5px;
    }
    
    .stat-card p {
        font-size: 0.75em;
    }
    
    .table-container {
        margin-top: 15px;
        border-radius: 8px;
    }
    
    table {
        font-size: 12px;
        min-width: 600px;
    }
    
    th, td {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    th {
        font-size: 11px;
        font-weight: 600;
    }
    
    .badge {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .alert {
        padding: 12px;
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .page-header h1 {
        font-size: 1.5em;
    }
    
    .page-header button {
        width: 100%;
    }
    
    /* Improve touch targets */
    .btn, .nav a, input[type="submit"], button {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Better spacing for forms */
    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    /* Compact alerts */
    .alert h3 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
    
    /* Better table scrolling indicator */
    .table-container::after {
        content: '← Scroll →';
        display: block;
        text-align: center;
        padding: 5px;
        color: #a78bfa;
        font-size: 11px;
        background: rgba(252, 231, 243, 0.5);
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
    
    .container {
        border-radius: 0;
        border: none;
    }
    
    .header {
        padding: 12px 8px;
        border-radius: 0;
    }
    
    .logo {
        height: 45px;
    }
    
    .header-subtitle {
        font-size: 0.75em;
    }
    
    .nav-toggle {
        padding: 10px;
        margin: 6px 10px;
    }
    
    .nav-toggle span {
        width: 22px;
        height: 2.5px;
    }
    
    .nav a {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .content {
        padding: 12px 8px;
    }
    
    .page-title {
        font-size: 1.2em;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-card h3 {
        font-size: 1.3em;
    }
    
    .stat-card p {
        font-size: 0.7em;
    }
    
    table {
        min-width: 500px;
        font-size: 11px;
    }
    
    th, td {
        padding: 8px 4px;
        font-size: 11px;
    }
    
    .btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Hide less important info on very small screens */
    .header-subtitle {
        display: none;
    }
    
    /* Improve touch targets for very small screens */
    .btn, .nav a, input[type="submit"], button {
        min-height: 48px;
    }
}

/* Tabs styling */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(244, 114, 182, 0.2);
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    background: rgba(254, 247, 255, 0.6);
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #a78bfa;
    transition: all 0.3s;
}

.tab:hover {
    background: rgba(252, 231, 243, 0.8);
}

.tab.active {
    background: #ffffff;
    color: #c084fc;
    border-bottom: 3px solid #c084fc;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form section styling */
.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.form-section h3 {
    margin-bottom: 20px;
}

/* Info text styling */
.info-text {
    color: #666;
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
}

/* Section heading styling */
.section-heading {
    margin-bottom: 20px;
}

.section-heading-spaced {
    margin-top: 40px;
    margin-bottom: 20px;
}

.section-heading-medium {
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Inline form styling */
.inline-form {
    display: inline;
}

/* Button size variants */
.btn-small {
    padding: 8px 15px;
    font-size: 14px;
}

/* Form container with conditional display */
.form-container {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

/* Error message styling */
.error-message {
    color: #721c24;
    font-size: 14px;
    margin-top: 5px;
}

/* Success message styling */
.success-message {
    color: #155724;
    font-size: 14px;
    margin-top: 5px;
}

/* Stat card with gradient */
.stat-card-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.92) 0%, rgba(5, 150, 105, 0.92) 100%);
}

/* Form validation styling */
.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: #333333;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #333333;
    border-width: 2px;
    background-color: #f8d7da;
}

/* Button container */
.button-container {
    margin-bottom: 30px;
}

/* Responsive tabs */
@media (max-width: 768px) {
    .tabs {
        flex-wrap: wrap;
        border-bottom: 2px solid rgba(244, 114, 182, 0.2);
    }
    
    .tab {
        padding: 12px 20px;
        font-size: 14px;
        flex: 1;
        min-width: 100px;
    }
    
    .form-section {
        padding: 20px 15px;
    }
}

