:root {
    --md-primary: #1976d2;
    --md-primary-hover: #1565c0;
    --md-bg: #f8fafc;
    --md-surface: #ffffff;
    --md-border: #e2e8f0;
    --md-text: #0f172a;
    --md-text-muted: #64748b;
    --md-danger: #d32f2f;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Roboto', sans-serif; background-color: var(--md-bg); color: var(--md-text); min-height: 100vh; }

/* Header & Sidebar */
.app-bar { position: fixed; top: 0; left: 0; right: 0; height: 64px; background: var(--md-primary); color: white; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; z-index: 100; box-shadow: var(--shadow-md); }
.app-bar .brand { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 20px; }
.wrapper { display: flex; width: 100%; margin-top: 64px; min-height: calc(100vh - 64px); }
.sidebar { width: 250px; background: var(--md-surface); border-right: 1px solid var(--md-border); padding: 20px 10px; display: flex; flex-direction: column; gap: 8px; position: fixed; height: calc(100vh - 64px); }
.nav-item { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 8px; cursor: pointer; color: var(--md-text-muted); font-weight: 500; font-size: 14px; text-decoration: none; transition: 0.2s; }
.nav-item:hover { background: #f1f5f9; color: var(--md-text); }
.nav-item.active { background: #e3f2fd; color: var(--md-primary); }

/* Main Content */
.content { flex: 1; padding: 32px; max-width: 1000px; margin-left: 250px; }
.card { background: var(--md-surface); border: 1px solid var(--md-border); border-radius: 12px; padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.card-title { font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.card-subtitle { font-size: 14px; color: var(--md-text-muted); margin-bottom: 20px; }

/* Forms & Inputs */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--md-text-muted); margin-bottom: 6px; }
.form-control { width: 100%; padding: 12px 14px; font-size: 14px; border: 1px solid var(--md-border); border-radius: 6px; outline: none; transition: border-color 0.2s; font-family: inherit; }
.form-control:focus { border-color: var(--md-primary); box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2); }
textarea.form-control { font-family: 'Courier New', monospace; min-height: 200px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: 0.2s; text-decoration: none; }
.btn-primary { background: var(--md-primary); color: white; }
.btn-primary:hover { background: var(--md-primary-hover); box-shadow: var(--shadow-sm); }
.btn-secondary { background: #f1f5f9; color: var(--md-text); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #fee2e2; color: var(--md-danger); }
.btn-danger:hover { background: #fecaca; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.data-table th, .data-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--md-border); font-size: 14px; }
.data-table th { background: #f8fafc; color: var(--md-text-muted); font-weight: 500; }

/* Login Specific */
.login-container { display: flex; justify-content: center; align-items: center; height: 100vh; background: var(--md-bg); }
.login-box { background: var(--md-surface); padding: 40px; border-radius: 12px; box-shadow: var(--shadow-md); width: 100%; max-width: 400px; text-align: center; }
/* Floating Save Bar for Edit Mode */
.floating-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--md-surface);
    border: 2px solid var(--md-primary);
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.floating-bar.active {
    bottom: 40px;
}
.floating-bar .edit-label {
    font-weight: 600;
    color: var(--md-text);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.floating-bar .edit-label i {
    color: var(--md-primary);
}
.floating-bar .btn {
    border-radius: 20px;
    padding: 8px 16px;
}