:root {
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-info: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-dark: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --gradient-sidebar: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #667eea;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

.page {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--gradient-sidebar);
    padding: 1.5rem;
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
}

.sidebar .nav-item {
    margin-bottom: 0.75rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.85);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
    border-left: 3px solid #4facfe;
}

.sidebar .nav-link.active {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: var(--shadow-md);
}

main {
    flex: 1;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.top-row {
    height: 4rem;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-md);
}

.top-row .navbar-brand {
    margin-left: 1.5rem;
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
}

.top-row .navbar-toggler {
    background-color: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.2);
}

.content {
    padding: 2rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Modern Card Styling */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    background: white;
    transition: box-shadow 0.3s ease, filter 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
    filter: brightness(1.05);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 1rem 1rem 0 0 !important;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Modern Button Styling */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

.btn-success {
    background: var(--gradient-success);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

.btn-secondary {
    background: var(--gradient-dark);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

/* Modern Table Styling */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead {
    background: var(--gradient-primary);
    color: white;
}

.table thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Alert Styling */
.alert {
    border-radius: 0.75rem;
    border: none;
    box-shadow: var(--shadow-sm);
}

.alert-info {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
    color: #0c5460;
}

/* Page Title */
h1, h2, h3, h4, h5 {
    color: #2c3e50;
    font-weight: 600;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .top-row {
        display: none;
    }
    
    main {
        width: 100%;
    }
    
    .page {
        flex-direction: column;
    }
}

@media (min-width: 768px) {
    .navbar-toggler {
        display: none;
    }
    
    .sidebar {
        overflow-y: auto;
    }
    
    .collapse {
        display: block !important;
    }
}