/* ===== NeoCalc Modern UI Design ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main > .container {
    padding: 120px 15px 20px;
    max-width: 1200px;
}

/* ===== Header & Navigation ===== */
nav.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: transform 0.2s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-1px);
}

.nav-link .nav__icon {
    display: none;
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

/* ===== Welcome Section ===== */
.jumbotron {
    background: var(--primary-gradient);
    color: white;
    padding: var(--spacing-2xl) var(--spacing-lg);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.jumbotron::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.jumbotron h1 {
    font-weight: 700;
    font-size: 1.875rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

/* ===== Function Buttons ===== */
.body-content .d-grid {
    gap: var(--spacing-lg);
    max-width: 600px;
}

.btn {
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 0.95rem;
    line-height: 1.4;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 0.95rem;
    line-height: 1.4;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.02);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
    padding: var(--spacing-md) var(--spacing-xl);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: white;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ===== Tables ===== */
.table {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
}

.table thead th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    border: none;
    padding: var(--spacing-lg);
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.table tbody td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-color: var(--border-color);
    font-size: 0.9rem;
}

.table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* ===== Forms ===== */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-primary);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
}

.input-group-text {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-left: none;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Language Switcher ===== */
.language-switcher .btn {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    transition: all 0.2s ease;
}

.language-switcher .btn:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    color: black;
}

/* ===== Version Info ===== */
.version-info {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

.version-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.version-info a:hover {
    text-decoration: underline;
}

/* ===== Modals ===== */
.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: var(--spacing-xl);
    background: var(--bg-primary);
}

.modal-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ===== Footer ===== */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===== Loading Animation ===== */
.page-loading:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-loading:after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== Error Messages ===== */
.invalid {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    font-weight: 500;
}

.alert {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-sm);
}

/* ===== Responsive Design ===== */
@media screen and (max-width: 991px) {
    .jumbotron h1 {
        font-size: 1.5rem;
    }
    
    .btn-success, .btn-secondary {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 767px) {
    footer {
        display: none;
    }
    
    #main {
        padding-bottom: 120px;
        height: 100%;
        overflow: auto;
    }
    
    main > .container {
        padding: 100px 15px 20px;
    }
    
    .jumbotron {
        padding: var(--spacing-xl) var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .jumbotron h1 {
        font-size: 1.375rem;
    }
    
    .my-header {
        display: flex;
        justify-content: space-between;
        flex-direction: row;
        flex-wrap: nowrap;
        width: 100%;
        overflow: auto;
        gap: var(--spacing-xs);
    }
    
    .nav-link {
        font-size: 0.75rem;
        color: #ffffff !important;
        font-weight: 600;
        padding: var(--spacing-sm) var(--spacing-xs);
        text-align: center;
        min-width: 0;
        flex: 1;
    }
    
    .nav-link .nav__icon {
        display: block;
        font-size: 1.5rem;
        margin-bottom: 2px;
    }
    
    .navbar-nav .show > .nav-link, 
    .navbar-nav .nav-link.active {
        color: white !important;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.2);
        border-radius: var(--radius-sm);
    }
    
    .mobile-menu {
        background: var(--primary-gradient) !important;
        padding: var(--spacing-md) var(--spacing-sm) var(--spacing-lg);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 100;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .language-switcher-mobile {
        background: var(--bg-primary);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        box-shadow: var(--shadow-sm);
    }
}

@media screen and (max-width: 450px) {
    .nav-link {
        font-size: 0.7rem;
        padding: var(--spacing-xs);
    }
    
    .nav-link .nav__icon {
        font-size: 1.25rem;
    }
    
    .mobile-menu {
        padding-left: var(--spacing-sm) !important;
        padding-right: var(--spacing-sm) !important;
    }
    
    .jumbotron h1 {
        font-size: 1.25rem;
    }


    .table {
    }

    .table thead th {
        padding: var(--spacing-sm);
        font-size: 0.875rem;
        letter-spacing: 0.025em;
    }

    .table tbody td {
        padding: var(--spacing-sm) var(--spacing-sm);
        font-size: 0.75rem;
    }
}

@media screen and (max-width: 380px) {
    .nav-link {
        font-size: 0.65rem;
    }
    
    .nav-link .nav__icon {
        font-size: 1.125rem;
    }
}

/* ===== Utility Classes ===== */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* ===== Animation Classes ===== */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Dark Mode Support (Future) ===== */
/*@media (prefers-color-scheme: dark) {*/
/*    :root {*/
/*        --bg-primary: #1e293b;*/
/*        --bg-secondary: #0f172a;*/
/*        --bg-tertiary: #334155;*/
/*        --text-primary: #f1f5f9;*/
/*        --text-secondary: #cbd5e1;*/
/*        --text-muted: #64748b;*/
/*        --border-color: #334155;*/
/*    }*/
/*}*/