* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Oxygen', Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 60px;
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.login-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

.login-footer code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* Main App */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left .logo {
    font-size: 40px;
    width: 60px;
    height: 60px;
}

.header-left h1 {
    font-size: 24px;
    color: #333;
}

.header-left p {
    font-size: 14px;
    color: #666;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.btn-icon {
    padding: 10px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #e0e0e0;
}

.btn-danger {
    padding: 10px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

/* Navigation Tabs */
.nav-tabs {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 0;
    overflow-x: auto;
    white-space: nowrap;
}

.nav-tab {
    background: none;
    border: none;
    padding: 16px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-tab:hover {
    background: #f8f9fa;
    color: #333;
}

.nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f0f4ff;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    overflow-y: auto;
}


/* Tab Content */
.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    min-height: 200px;   /* KLJUČNA LINIJA */
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-card.critical {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.stat-card.warning {
    background: linear-gradient(135deg, #f9ca24 0%, #f0932b 100%);
    color: white;
}

.stat-icon {
    font-size: 50px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
}

/* Card */
.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-grid input,
.form-grid select,
.form-grid-3 input,
.form-grid-3 select {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid-3 input:focus,
.form-grid-3 select:focus {
    outline: none;
    border-color: #667eea;
}

.form-grid button,
.form-grid-3 button {
    grid-column: 1 / -1;
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    border-bottom: 2px solid #e0e0e0;
}

td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-ok {
    background: #d4edda;
    color: #155724;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-critical {
    background: #f8d7da;
    color: #721c24;
}

/* Delete Button */
.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.btn-delete:hover {
    background: #c82333;
}

/* Recent Activity */
.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 5px;
}

.activity-title {
    font-weight: 600;
    color: #333;
}

.activity-subtitle {
    font-size: 13px;
    color: #666;
}

.activity-amount {
    font-weight: 700;
    color: #667eea;
}

.activity-meta {
    font-size: 12px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .nav-tabs {
        overflow-x: scroll;
    }
}
/* User Management Styles */
.user-form {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.checkbox-group {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permissions-grid {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #f8f9fa;
}

.permissions-grid h4 {
    margin-bottom: 15px;
    color: #333;
}

.permission-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.permission-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.permission-row label:hover {
    background: #e8f0fe;
}

.permission-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.role-admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.role-user {
    background: #e0e0e0;
    color: #333;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-small {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon-small:hover {
    background: #f0f0f0;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.device-add,
.device-list {
    margin-bottom: 20px;
}

.device-add h4,
.device-list h4 {
    margin-bottom: 10px;
    color: #333;
}

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.help-text code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
}

.device-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.device-info {
    flex: 1;
}

.device-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.device-fingerprint {
    font-size: 11px;
    color: #666;
    font-family: monospace;
    word-break: break-all;
}

.device-date {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}
/* Clickable Cards */
.clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Large Modal */
.large-modal {
    max-width: 900px;
}

/* Detail Table */
.detail-table {
    width: 100%;
    margin-top: 20px;
}

.detail-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    border-bottom: 2px solid #e0e0e0;
}

.detail-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.detail-table tr:hover {
    background: #f8f9fa;
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Highlight */
.highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

.form-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-vertical .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-vertical label {
    font-weight: 500;
    color: #333;
}

.form-vertical input,
.form-vertical textarea,
.form-vertical select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-vertical input:disabled {
    background-color: #f5f5f5;
    color: #666;
}

.form-vertical textarea {
    resize: vertical;
    min-height: 60px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-icon-small {
    padding: 5px 10px;
    border: none;
    background: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.btn-icon-small:hover {
    background: #e0e0e0;
}

/* Edit Ugradnja Modal */
#edit-ugradnja-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#edit-ugradnja-modal .modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

#edit-ugradnja-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

#edit-ugradnja-modal .modal-header h3 {
    margin: 0;
}

#edit-ugradnja-modal .modal-body {
    padding: 20px;
}

#edit-ugradnja-modal .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

#edit-ugradnja-modal .close-btn:hover {
    color: #333;
}

.form-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-vertical .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-vertical label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-vertical input,
.form-vertical textarea,
.form-vertical select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-vertical input:disabled {
    background-color: #f5f5f5;
    color: #666;
}

.form-vertical textarea {
    resize: vertical;
    min-height: 60px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-icon-small {
    padding: 5px 10px;
    border: none;
    background: #e3f2fd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.btn-icon-small:hover {
    background: #bbdefb;
}
/* Edit Ugradnja Modal - MORA BITI IZNAD DETAIL MODALA */
#edit-ugradnja-modal {
    z-index: 2000 !important;
}

#edit-ugradnja-modal .modal-content {
    max-width: 500px;
}

/* ============= ALARM SISTEM ============= */

/* Alarm sekcija na dashboard-u */
.alarmi-section {
    margin-bottom: 30px;
}

.alarmi-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.alarmi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.alarmi-header h3 {
    margin: 0;
}

#alarmi-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Pojedinačni alarm */
.alarm-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.alarm-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.alarm-critical {
    background: linear-gradient(135deg, #ffe5e5 0%, #ffd4d4 100%);
    border-left: 4px solid #dc3545;
}

.alarm-warning {
    background: linear-gradient(135deg, #fff8e5 0%, #fff3cd 100%);
    border-left: 4px solid #ffc107;
}

.alarm-icon {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

.alarm-content {
    flex: 1;
    min-width: 0;
}

.alarm-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.alarm-deo {
    font-size: 13px;
    color: #555;
    margin-top: 2px;
}

.alarm-message {
    font-size: 13px;
    color: #333;
    margin-top: 4px;
    font-weight: 500;
}

.alarm-date, .alarm-km {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

.alarm-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.alarm-badge.critical {
    background: #dc3545;
    color: white;
}

.alarm-badge.warning {
    background: #ffc107;
    color: #333;
}

/* No alarmi state */
.no-alarmi {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-alarmi-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* Alarm counter u headeru */
.alarm-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.alarm-counter.critical {
    background: #dc3545;
    animation: pulse 1.5s infinite;
}

.alarm-counter.warning {
    background: #ffc107;
    color: #333;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Header alarm button */
#alarm-btn {
    position: relative;
    padding: 10px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

#alarm-btn:hover {
    background: #e0e0e0;
}

#alarm-btn.has-critical {
    background: #ffe5e5;
    animation: pulse-bg 2s infinite;
}

#alarm-btn.has-warning {
    background: #fff8e5;
}

@keyframes pulse-bg {
    0% { background: #ffe5e5; }
    50% { background: #ffcccc; }
    100% { background: #ffe5e5; }
}

/* Settings sections */
.settings-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

/* Settings modal wider */
#alarm-settings-modal .modal-content {
    max-width: 600px;
}

/* ============= INTERAKTIVNI ALARMI ============= */

/* Vehicle info banner */
.vehicle-info-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
}

.vehicle-info-banner .vehicle-icon {
    font-size: 36px;
}

.vehicle-info-banner strong {
    display: block;
    font-size: 18px;
}

.vehicle-info-banner span {
    font-size: 14px;
    opacity: 0.9;
}

/* Current status display */
.current-status {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.status-item.status-critical {
    background: #f8d7da;
}

.status-item.status-warning {
    background: #fff3cd;
}

.status-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.status-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Form sections */
.form-section {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.form-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #333;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.form-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #ddd;
}

.form-divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    color: #666;
    font-size: 12px;
}

/* Quick action buttons */
.quick-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.quick-actions span {
    font-size: 13px;
    color: #666;
}

.btn-quick {
    padding: 6px 12px;
    background: #e9ecef;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-quick:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Success button */
.btn-success {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-success:hover {
    background: #218838;
}

/* Required field indicator */
.required {
    color: #dc3545;
}

/* Help text */
.help-text {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

/* Alarm edit hint */
.alarm-edit-hint {
    display: none;
    font-size: 11px;
    color: #667eea;
    margin-right: 10px;
}

.alarm-item:hover .alarm-edit-hint {
    display: block;
}

/* Notification toast */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.notification-info {
    background: #cce5ff;
    color: #004085;
    border-left: 4px solid #007bff;
}

.notification.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Modal improvements */
.modal-content {
    max-width: 550px;
}

/* Responsive form row */
@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        justify-content: center;
    }

    .current-status {
        flex-direction: column;
    }
}
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: #f4f6ff;
}
/* ===== MODAL STILOVI ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid #007bff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h2 {
    margin: 0;
    color: #007bff;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    text-align: right;
    background: #f8f9fa;
}

.close-btn {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 30px;
    transition: all 0.2s;
}

.close-btn:hover {
    color: #000;
    background: #e9ecef;
    border-radius: 50%;
}

/* ===== ISTORIJA TABELA ===== */
.istorija-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.istorija-table th,
.istorija-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.istorija-table th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.istorija-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* ===== BOJE ZA AKCIJE ===== */
.akcija-create {
    background-color: #d4edda !important;
}

.akcija-update {
    background-color: #fff3cd !important;
}

.akcija-delete {
    background-color: #f8d7da !important;
}

/* ===== BADGE-OVI ===== */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    white-space: nowrap;
}

.badge-create {
    background-color: #28a745;
    color: white;
}

.badge-update {
    background-color: #ffc107;
    color: #000;
}

.badge-delete {
    background-color: #dc3545;
    color: white;
}

/* ===== PAGINACIJA STILOVI ===== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 40px;
}

.pagination button:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #4472C4;
    color: #4472C4;
}

.pagination button.active {
    background: #4472C4;
    color: white;
    border-color: #4472C4;
    font-weight: bold;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pagination span {
    padding: 8px 12px;
    color: #666;
}

/* ===== EXPORT DUGMIĆI ===== */

.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    margin-left: 5px;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    margin-left: 5px;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ===== TABELA RESPONSIVNOST ===== */

@media (max-width: 1200px) {
    .table-container table {
        font-size: 13px;
    }

    .table-container th,
    .table-container td {
        padding: 8px 6px;
    }
}

@media (max-width: 768px) {
    .pagination {
        font-size: 12px;
    }

    .pagination button {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }

    .btn-success,
    .btn-danger {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Skrivanje nekih kolona na malim ekranima */
    .table-container table th:nth-child(n+7),
    .table-container table td:nth-child(n+7) {
        display: none;
    }
}

/* ===== ANIMACIJE ===== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-container tbody tr {
    animation: fadeIn 0.3s ease-in-out;
}

/* ===== LOADING STATE ===== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4472C4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



