/* ============================================
   MOBILE FIRST - Modern Design E-SERVIS
   ============================================ */

/* Reset i osnovni stilovi */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #309EAE 0%, #216C7C 100%);
    --primary-color: #309EAE;
    --secondary-color: #216C7C;
    --accent-color: #365E99;
    --dark-blue: #19273D;
    --darker-blue: #0A1731;
    --light-bg: #E9F9FB;
    --gray-blue: #748A8B;
    --light-gray: #99B8BB;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-dark: #0A1731;
    --text-light: #748A8B;
    --bg-light: #E9F9FB;
    --border-color: #99B8BB;
    --shadow-sm: 0 1px 2px 0 rgba(10, 23, 49, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(10, 23, 49, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(10, 23, 49, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(10, 23, 49, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Container za login i registraciju */
.container {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.6s ease-out;
}

/* Za registraciju - širi container */
.container.register-container {
    max-width: 900px;
}

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

.form-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 32px 24px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 24px;
    animation: scaleIn 0.5s ease-out 0.2s backwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.logo {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.logo-small {
    max-width: 60px;
    height: auto;
    margin-right: 12px;
}

/* Naslovi */
h1 {
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 28px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 700;
}

h3 {
    color: var(--text-dark);
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

/* Flash poruke - Modern alerts */
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.alert i {
    font-size: 18px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Forma */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 14px;
}

.required {
    color: var(--error-color);
    margin-left: 2px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(48, 158, 174, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: var(--text-light);
}

/* Grid layout za registraciju */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.form-group-full {
    grid-column: 1 / -1;
}

/* Custom Select - Moderni dropdown */
.custom-select-wrapper {
    position: relative;
}

.custom-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    color: var(--text-dark);
}

.custom-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(48, 158, 174, 0.1);
}

.custom-select option {
    padding: 12px;
    background: white;
    color: var(--text-dark);
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.custom-select:focus + .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Responsive grid */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Dugmad - Modern buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    width: 100%;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(48, 158, 174, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(48, 158, 174, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #365E99 0%, #293F5F 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Form footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    color: var(--text-light);
    font-size: 14px;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.form-footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}


/* ============================================
   DASHBOARD - Modern Mobile First Design
   ============================================ */

.dashboard-container {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #309EAE 0%, #19273D 100%);
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.4s ease-out;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-content h1 {
    margin: 0;
    font-size: 20px;
    color: var(--text-dark);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
}

.dashboard-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
    animation: fadeInUp 0.6s ease-out;
}

/* Welcome section - Modern card */
.welcome-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 28px 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: scaleIn 0.5s ease-out 0.1s backwards;
}

.welcome-section h2 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-section h2 i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 26px;
}

.welcome-text {
    color: var(--text-light);
    font-size: 15px;
    margin-top: 8px;
    line-height: 1.5;
}

/* User info card - Glass morphism */
.user-info-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 28px 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: scaleIn 0.5s ease-out 0.2s backwards;
}

.user-info-card h3 {
    color: var(--text-dark);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info-card h3 i {
    color: var(--primary-color);
    font-size: 20px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: linear-gradient(135deg, #E9F9FB 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-row:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.detail-label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-label i {
    color: var(--primary-color);
    font-size: 14px;
}

.detail-value {
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
}

/* Actions section - Modern grid */
.actions-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 28px 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: scaleIn 0.5s ease-out 0.3s backwards;
}

.actions-section h3 {
    color: var(--text-dark);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.actions-section h3 i {
    color: var(--primary-color);
    font-size: 20px;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.action-buttons .btn-secondary {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Footer - Minimal modern */
.dashboard-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: auto;
}

.dashboard-footer p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE - Mobile First to Desktop
   ============================================ */

/* Tablet - 640px and up */
@media (min-width: 640px) {
    .container {
        max-width: 480px;
    }
    
    .form-wrapper {
        padding: 40px 32px;
    }
    
    .logo {
        max-width: 140px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .dashboard-header {
        padding: 20px 32px;
    }
    
    .dashboard-content {
        padding: 32px 24px;
    }
    
    .welcome-section,
    .user-info-card,
    .actions-section {
        padding: 32px;
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop - 768px and up */
@media (min-width: 768px) {
    body {
        padding: 24px;
    }
    
    .header-content h1 {
        font-size: 24px;
    }
    
    .logo-small {
        max-width: 70px;
    }
    
    .detail-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .detail-label {
        font-size: 14px;
    }
    
    .detail-value {
        font-size: 15px;
        text-align: right;
    }
}

/* Large Desktop - 1024px and up */
@media (min-width: 1024px) {
    .dashboard-content {
        padding: 40px 32px;
    }
    
    .action-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .welcome-section h2 {
        font-size: 28px;
    }
    
    .welcome-text {
        font-size: 16px;
    }
}

/* Extra smooth animations */
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Keep the current light theme for now */
    /* Can be extended later if needed */
}
