:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --danger: #ef4444;
    --success: #22c55e;
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Utilities */
.hidden {
    display: none !important;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-secondary:hover {
    background-color: var(--border);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

.text-danger {
    color: var(--danger);
}

/* Lock Screen */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lock-container {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.lock-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.lock-container h1 {
    margin-bottom: 0.5rem;
}

.lock-container p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.warning-text {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--danger) !important;
}

/* Dashboard Layout */
.app-dashboard {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.8rem 1rem;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-dark);
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Grid & Cards */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: 0.2s;
    position: relative;
}

.item-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card-actions {
    opacity: 0;
    transition: 0.2s;
}

.item-card:hover .card-actions {
    opacity: 1;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    margin-left: 0.5rem;
}

.action-btn:hover {
    color: var(--text-main);
}

.action-btn.delete:hover {
    color: var(--danger);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.detail-label {
    color: var(--text-muted);
}

.detail-value {
    font-family: monospace;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-card);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    border: 1px solid var(--border);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    transition: 0.3s;
    z-index: 4000;
}

.toast.show {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .app-dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .brand {
        margin-bottom: 0;
        margin-right: 2rem;
        font-size: 1.2rem;
    }

    .nav-menu {
        flex-direction: row;
    }

    .nav-item span {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    /* Hide lock button on mobile sidebar, maybe move to top bar */
    .content-area {
        padding: 1rem;
    }
}